mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
64c52b0d30
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]
18 lines
350 B
C
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;
|
|
}
|