summaryrefslogtreecommitdiff
path: root/src/mytime.h
blob: 48eba0630c386a987c176c6ae0918f75d85f57d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once

#include <stdint.h>
#include <time.h>

#define TIME_JOIN(H, M, S) ((H) * 3600 + (M) * 60 + (S))
#define TIME_AS_FLOAT(T) (((double)T.tv_sec) + ((double)T.tv_nsec / 1000000000.0))

struct timespec get_current_time();

void enable_fake_time();
void progress_time(uint64_t diff);