From e7e9a66629ada359ad6a35cdb12e0e35b49e889c Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 7 Aug 2009 12:33:59 +0000 Subject: Added plink tool (version without console, except if output is generated) Added possibility to build console application or windows application in makefile.after --- tools/plink/time.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tools/plink/time.c (limited to 'tools/plink/time.c') diff --git a/tools/plink/time.c b/tools/plink/time.c new file mode 100644 index 000000000..d873d44cc --- /dev/null +++ b/tools/plink/time.c @@ -0,0 +1,16 @@ +/* + * Portable implementation of ltime() for any ISO-C platform where + * time_t behaves. (In practice, we've found that platforms such as + * Windows and Mac have needed their own specialised implementations.) + */ + +#include +#include + +struct tm ltime(void) +{ + time_t t; + time(&t); + assert (t != ((time_t)-1)); + return *localtime(&t); +} -- cgit v1.2.3