Sebastian Kuschel reports that pfd_closing can be called for a socket
[u/mdw/putty] / time.c
CommitLineData
21a22afe 1/*
2 * Portable implementation of ltime() for any ISO-C platform where
3 * time_t behaves. (In practice, we've found that platforms such as
4 * Windows and Mac have needed their own specialised implementations.)
5 */
6
aca589d9 7#include <time.h>
8#include <assert.h>
9
10struct tm ltime(void)
11{
12 time_t t;
13 time(&t);
14 assert (t != ((time_t)-1));
15 return *localtime(&t);
16}