summaryrefslogtreecommitdiff
path: root/wsutil/time_util.h
AgeCommit message (Collapse)AuthorFilesLines
2016-08-30time_util: fix -Wshadow issuePeter Wu1-3/+3
time_util.c was already fixed, but the header was missing the change, breaking the build on a very old compiler. Change-Id: I95685c9a3e25dcb7567f2551b92f20c8792a6e47 Reviewed-on: https://code.wireshark.org/review/17384 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-07-30Add string function times to wmem_test.Gerald Combs1-0/+11
The system, GLib, and wmem string functions can perform differently, particularly on Windows. Start adding performance tests to wmem_test so that we can see the differences. With this change applied "wmem_test --verbose" prints out the following on a Windows 7 x64 VM here. wmem_test is linked against GLib 2.4.20. (MINPERF:g_printf_string_upper_bound (via g_snprintf) 1 string: u 327.602 ms s 0 .000 ms) (MINPERF:g_printf_string_upper_bound (via g_snprintf) 5 strings: u 1419.609 ms s 0.000 ms) (MINPERF:g_printf_string_upper_bound (via g_snprintf) mixed args: u 1606.810 ms s 0.000 ms) (MINPERF:_snprintf_s upper bound 1 string: u 124.801 ms s 0.000 ms) (MINPERF:_snprintf_s upper bound 5 strings: u 140.401 ms s 0.000 ms) (MINPERF:_snprintf_s upper bound mixed args: u 124.801 ms s 0.000 ms) (MINPERF:g_strdup_printf 2 strings: u 702.005 ms s 0.156 ms) (MINPERF:g_strconcat 2 strings: u 78.000 ms s 0.000 ms) (MINPERF:g_strdup_printf 5 strings: u 1419.609 ms s 0.156 ms) (MINPERF:g_strconcat 5 strings: u 93.601 ms s 0.156 ms) (MINPERF:wmem_strdup_printf 2 strings: u 343.202 ms s 0.312 ms) (MINPERF:wmem_strconcat 2 strings: u 93.601 ms s 0.468 ms) (MINPERF:wmem_strdup_printf 5 strings: u 327.602 ms s 8.268 ms) (MINPERF:wmem_strconcat 5 strings: u 62.400 ms s 3.432 ms) Change-Id: Id9b23918829db1719d141e7f830b9eba6245a25b Reviewed-on: https://code.wireshark.org/review/14857 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-12Add resource usage logging.Gerald Combs1-0/+21
Add log_resource_usage, which prints the current and elapsed user and system times. Add a usage example in packet_list_model.cpp. Change-Id: I747161c754a3731e540821715cc9bb10b3dc821d Reviewed-on: https://code.wireshark.org/review/16383 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-04-25Move mktime_utc() from tvbuff.c to wsutil/time_util.cJakub Zawadzki1-0/+32
Also do little cleanup in mktime_utc (one big #ifndef) Change-Id: I8f721ba76cad856cfef0a2d78e7f98686f8e4e3f Reviewed-on: https://code.wireshark.org/review/1327 Reviewed-by: Anders Broman <a.broman58@gmail.com>