| 631 | |
| 632 | |
| 633 | static const char* timestamp() |
| 634 | { |
| 635 | static char buf[32]; |
| 636 | time_t time = std::time(NULL); |
| 637 | strcpy(buf, std::asctime(std::localtime(&time))); |
| 638 | buf[strlen(buf) - 1] = '\0'; // Remove trailing newline |
| 639 | return buf; |
| 640 | } |
| 641 | |
| 642 | extern "C" { typedef void (*signal_handler_t)(int); } |
| 643 | static std::atomic<std::uint64_t> g_seed(0); |