Skip to content

Commit 6d821e5

Browse files
committed
current_time handling changes
1 parent a082874 commit 6d821e5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

include/ejudge/serve_state.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "ejudge/contest_plugin.h"
2525

2626
#include <time.h>
27+
#include <sys/time.h>
2728

2829
struct generic_section_config;
2930
struct section_global_data;
@@ -248,7 +249,6 @@ struct serve_state
248249
int *group_member_map;
249250

250251
time_t load_time;
251-
time_t current_time;
252252
int clients_suspended;
253253
int testing_suspended;
254254
int printing_suspended;
@@ -257,6 +257,13 @@ struct serve_state
257257
int standings_updated;
258258
int has_olympiad_mode;
259259

260+
// legacy timestamp
261+
time_t current_time;
262+
// microsecond precision timestamp
263+
long long current_time_us;
264+
// raw structure
265+
struct timeval current_time_tv;
266+
260267
// upsolving mode
261268
int upsolving_mode;
262269
int upsolving_freeze_standings;

0 commit comments

Comments
 (0)