2 * PuTTY miscellaneous Unix stuff
11 unsigned long getticks(void)
14 gettimeofday(&tv
, NULL
);
16 * This will wrap around approximately every 4000 seconds, i.e.
17 * just over an hour, which is more than enough.
19 return tv
.tv_sec
* 1000000 + tv
.tv_usec
;
22 Filename
filename_from_str(const char *str
)
25 strncpy(ret
.path
, str
, sizeof(ret
.path
));
26 ret
.path
[sizeof(ret
.path
)-1] = '\0';
30 const char *filename_to_str(const Filename
*fn
)
35 int filename_equal(Filename f1
, Filename f2
)
37 return !strcmp(f1
.path
, f2
.path
);
40 int filename_is_null(Filename fn
)
46 static FILE *debug_fp
= NULL
;
51 debug_fp
= fopen("debug.log", "w");
54 write(1, buf
, strlen(buf
));