X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxmisc.c;h=c613a204f5b779714f9cac13314676b01c09c00f;hb=49d2cf19accb059b3b68d1fc2b78e606a578c3e8;hp=28ae83a2af29d5d90bf142113d1615885e6beba1;hpb=36fc6c0a76dc763509feaca48295a9befa7d5c4d;p=PuTTY.git diff --git a/unix/uxmisc.c b/unix/uxmisc.c index 28ae83a2..c613a204 100644 --- a/unix/uxmisc.c +++ b/unix/uxmisc.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include @@ -10,6 +11,8 @@ #include "putty.h" +long tickcount_offset = 0; + unsigned long getticks(void) { struct timeval tv; @@ -19,7 +22,7 @@ unsigned long getticks(void) * because we need a decent number of them to fit into a 32-bit * word so it can be used for keepalives. */ - return tv.tv_sec * 1000 + tv.tv_usec / 1000; + return tv.tv_sec * 1000 + tv.tv_usec / 1000 + tickcount_offset; } Filename filename_from_str(const char *str)