Coverage Report

Created: 2025-04-03 08:43

/src/wireshark/epan/timestamp.c
Line
Count
Source (jump to first uncovered line)
1
/* timestamp.c
2
 * Routines for timestamp type setting.
3
 *
4
 * Wireshark - Network traffic analyzer
5
 * By Gerald Combs <gerald@wireshark.org>
6
 * Copyright 1998 Gerald Combs
7
 *
8
 * SPDX-License-Identifier: GPL-2.0-or-later
9
 */
10
11
#include "config.h"
12
13
#include "timestamp.h"
14
15
/* Init with an invalid value, so that "recent" in ui/gtk/menu.c can detect this
16
 * and distinguish it from a command line value */
17
static ts_type timestamp_type = TS_NOT_SET;
18
19
static int timestamp_precision = TS_PREC_AUTO;
20
21
static ts_seconds_type timestamp_seconds_type = TS_SECONDS_NOT_SET;
22
23
ts_type timestamp_get_type(void)
24
0
{
25
0
  return timestamp_type;
26
0
}
27
28
void timestamp_set_type(ts_type ts_t)
29
2
{
30
2
  timestamp_type = ts_t;
31
2
}
32
33
34
int timestamp_get_precision(void)
35
0
{
36
0
  return timestamp_precision;
37
0
}
38
39
void timestamp_set_precision(int tsp)
40
2
{
41
2
  timestamp_precision = tsp;
42
2
}
43
44
45
ts_seconds_type timestamp_get_seconds_type(void)
46
0
{
47
0
  return timestamp_seconds_type;
48
0
}
49
50
void timestamp_set_seconds_type(ts_seconds_type ts_t)
51
2
{
52
2
  timestamp_seconds_type = ts_t;
53
2
}
54
55
/*
56
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
57
 *
58
 * Local variables:
59
 * c-basic-offset: 8
60
 * tab-width: 8
61
 * indent-tabs-mode: t
62
 * End:
63
 *
64
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
65
 * :indentSize=8:tabSize=8:noTabs=false:
66
 */