Rename a time variable to reflect its units.

The S/370-and-later TOD clock counts in microseconds, not seconds.

Change-Id: I0b11586df073ed589d69ffc014e6f8661dff3d31
Reviewed-on: https://code.wireshark.org/review/35891
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2020-01-21 12:56:55 -08:00
parent fc31446277
commit 3d2ccf4a9e
1 changed files with 7 additions and 7 deletions

View File

@ -1809,7 +1809,7 @@ get_time_value(proto_tree *tree, tvbuff_t *tvb, const gint start,
{
guint32 tmpsecs;
guint64 tmp64secs;
guint64 todsecs;
guint64 todusecs;
switch (encoding) {
@ -2003,9 +2003,9 @@ get_time_value(proto_tree *tree, tvbuff_t *tvb, const gint start,
DISSECTOR_ASSERT(length == 8);
if (length == 8) {
todsecs = tvb_get_ntoh64(tvb, start) >> 12;
time_stamp->secs = (time_t)((todsecs / 1000000) - TOD_BASETIME);
time_stamp->nsecs = (int)((todsecs % 1000000) * 1000);
todusecs = tvb_get_ntoh64(tvb, start) >> 12;
time_stamp->secs = (time_t)((todusecs / 1000000) - TOD_BASETIME);
time_stamp->nsecs = (int)((todusecs % 1000000) * 1000);
} else {
time_stamp->secs = 0;
time_stamp->nsecs = 0;
@ -2022,9 +2022,9 @@ get_time_value(proto_tree *tree, tvbuff_t *tvb, const gint start,
DISSECTOR_ASSERT(!is_relative);
if (length == 8) {
todsecs = tvb_get_letoh64(tvb, start) >> 12 ;
time_stamp->secs = (time_t)((todsecs / 1000000) - TOD_BASETIME);
time_stamp->nsecs = (int)((todsecs % 1000000) * 1000);
todusecs = tvb_get_letoh64(tvb, start) >> 12 ;
time_stamp->secs = (time_t)((todusecs / 1000000) - TOD_BASETIME);
time_stamp->nsecs = (int)((todusecs % 1000000) * 1000);
} else {
time_stamp->secs = 0;
time_stamp->nsecs = 0;