1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/unix/uxmisc.c
Simon Tatham 64c52b0d30 Begin destabilisation in the wake of 0.53! This checkin contains the
beginning of a Unix port. It's nowhere near done, and currently it
won't even compile on Unix. But this represents the start of the
process of separating out platform-specific code, and also contains
the mkfiles.pl changes required to support a Unix makefile and a
non-flat source tree.

[originally from svn r1993]
2002-10-07 16:45:23 +00:00

18 lines
350 B
C

/*
* PuTTY miscellaneous Unix stuff
*/
#include <stdio.h>
#include <sys/time.h>
unsigned long getticks(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
/*
* This will wrap around approximately every 4000 seconds, i.e.
* just over an hour, which is more than enough.
*/
return tv.tv_sec * 1000000 + tv.tv_usec;
}