Using c++, usleep() and sleep() don't work and currently the timestamp is being measured hundreds of times a second instead of every minute
// CPP program to print current date and time
// using time and ctime.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
int main () {
for( ; ; ){
// declaring argument of time()
time_t my_time = time(NULL);
// ctime() used to give the present time
printf("%s", ctime(&my_time));
}
return 0;
}