diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-04-20 18:27:41 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-04-21 01:28:15 +0000 |
commit | 8b720910d2ae04aab24709cf30363e9f064e2c63 (patch) | |
tree | 62da61102824a5a03f02a73c6fdfe34777c3d32e /wsutil/nstime.h | |
parent | c35f2ccb4433718416551cc7a85afb0860529d57 (diff) |
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 <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/nstime.h')
-rw-r--r-- | wsutil/nstime.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 */ |