From 8b720910d2ae04aab24709cf30363e9f064e2c63 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 20 Apr 2015 18:27:41 -0700 Subject: Calculate *Peek tagged timestamps in fixed-point. Add a variant of filetime_to_nstime() that takes a value that's like a FILETIME but in units of nanoseconds rather than tenths of a microsecond, and use that. (It looks as if they might just get FILETIME values from the OS and multiply them by 100, as the nanosecond-FILETIME values appear to be multiples of 100 in the captures I've seen, but they might have chosen nanosecond resolution in case they need to support a higher-resolution time stamp source, so we don't assume that the values will always be a multiple of 100.) Change-Id: If6a1cb2cb673688b042eb113b79cfd267f5454a5 Reviewed-on: https://code.wireshark.org/review/8150 Reviewed-by: Guy Harris --- wsutil/nstime.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wsutil/nstime.h') diff --git a/wsutil/nstime.h b/wsutil/nstime.h index c72daa19c6..4145ac583c 100644 --- a/wsutil/nstime.h +++ b/wsutil/nstime.h @@ -106,6 +106,11 @@ WS_DLL_PUBLIC double nstime_to_sec(const nstime_t *nstime); FALSE on failure */ WS_DLL_PUBLIC gboolean filetime_to_nstime(nstime_t *nstime, guint64 filetime); +/** converts time like Windows FILETIME, but expressed in nanoseconds + rather than tenths of microseconds, to nstime, returns TRUE on success, + FALSE on failure */ +WS_DLL_PUBLIC gboolean nsfiletime_to_nstime(nstime_t *nstime, guint64 nsfiletime); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit v1.2.1