Returns a formatted timestamp. Returned buffer is only valid until the next call. Not thread-safe.
| 1691 | // Returned buffer is only valid until the next call. |
| 1692 | // Not thread-safe. |
| 1693 | static const char* timestamp() |
| 1694 | { |
| 1695 | static char buf[32]; |
| 1696 | time_t time = std::time(NULL); |
| 1697 | strcpy(buf, std::asctime(std::localtime(&time))); |
| 1698 | buf[strlen(buf) - 1] = '\0'; // Remove trailing newline |
| 1699 | return buf; |
| 1700 | } |
| 1701 | |
| 1702 | static inline bool isvowel(char ch) |
| 1703 | { |