-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaJUtils.h
30 lines (23 loc) · 848 Bytes
/
aJUtils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef AJ_THE_UTILS_FOR_MEMMODEL_H
#define AJ_THE_UTILS_FOR_MEMMODEL_H
#include <chrono>
#include <string>
#include <cstdint>
/******************************
Utility functions and struct
******************************/
const std::chrono::steady_clock::time_point startup =
std::chrono::steady_clock::now();
// if isInode == false
// returns microseconds from program start (steady_clock)
// else
// returns milliseconds from epoch start (system_clock)
uint64_t getCurTime(bool isInode = false);
// Tabber manipulator inserts num tabs into os. If newline == true, and
// num != numTabs, precedes tabs with a newline and resets numTabs to num
struct Tabber {
static uint32_t numTabs;
std::string operator()(uint32_t num, bool newline = false);
};
std::ostream &operator<<(std::ostream& os, const Tabber& tbr);
#endif