summaryrefslogtreecommitdiff
path: root/wsutil/nstime.h
AgeCommit message (Collapse)AuthorFilesLines
2016-01-03No need for "struct nstime_t", "nstime_t" by itself suffices.Guy Harris1-1/+1
(That should also keep people from deciding that they don't want to include <wsutil/nstime.h>, but still want to use Wireshark nanosecond times, and do so by sticking a private incomplete definition of "struct nstime_t" into the code.) Change-Id: I94e863fe7083ebba254c3a718b85088a89fb6b7d Reviewed-on: https://code.wireshark.org/review/13022 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-21Calculate *Peek tagged timestamps in fixed-point.Guy Harris1-0/+5
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>
2015-04-20Have a common routine to convert FILETIME to nstime_t.Guy Harris1-0/+4
We had several copies of that code; put it into a filetime_to_nstime() routine in wsutil, and call that common routine instead. Change-Id: I1eb5579c36c129ff8d23f9212285ab3f63be0f43 Reviewed-on: https://code.wireshark.org/review/8142 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-23More handling of missing time stamps.Guy Harris1-1/+1
Make nstime_cmp() handle "unset" time stamps (they're equal to other "unset" time stamps, and less than all other time stamps), use it in reordercap, and "unset" the time stamp if it's absent. Also, nstime_cmp() does not modify its argument, so make it const. Change-Id: I016dab5fefaf4696e78cbd8c6dd3395808e54369 Reviewed-on: https://code.wireshark.org/review/1769 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-14Add tvb_get and proto_tree_add for string-encoded timestampsHadriel Kaplan1-1/+1
This commit adds tvb_get_string_time and proto_tree_add_time_item routines for getting nstime fields from the tvb when they are encoded in ASCII string form. The proto_tree_add_time_item routine is also usable for normal big/little-endian encoded time_t, and has the advantage of retrieving the value even if there's no proto tree. It also exposes the routines to Lua, both so that a Lua script can take advantage of this, but also so I can write a testsuite to test the functions. Change-Id: I955da10f68f2680e3da3a5be5ad8fdce7ed6808c Reviewed-on: https://code.wireshark.org/review/1084 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-11-09Replace wtap_nstime with nstime_t, remove wtap_nstime_to_sec.Jakub Zawadzki1-4/+0
After r50154 nstime_t is inside wsutil/ so wiretap don't need it's own copy. svn path=/trunk/; revision=53184
2013-06-25Move a couple of time-related modules into wsutil.Jeff Morriss1-0/+115
A bunch of files didn't really need to include these header files so remove the include line rather than changing it. svn path=/trunk/; revision=50154