mirror of
https://github.com/diamante0018/MonitorRam.git
synced 2025-05-09 14:04:55 +00:00
15 lines
232 B
C
15 lines
232 B
C
#include <time.h>
|
|
#include <unistd.h>
|
|
|
|
#include "common.h"
|
|
|
|
// Prints the time
|
|
void get_time_stamp(char* buf) {
|
|
time_t ltime;
|
|
struct tm result;
|
|
|
|
ltime = time(NULL);
|
|
localtime_r(<ime, &result);
|
|
asctime_r(&result, buf);
|
|
}
|