#include <stdio.h>
#include <time.h>
#include <string.h>

void TimeDateStamp(char *current_time)
{
  time_t current_time_seconds; // current time in seconds
  int size;

  time(&current_time_seconds); // get the current time
  sprintf(current_time,"%s",ctime(&current_time_seconds)); // convert
  to time-date stamp
  size = strlen(current_time);
  current_time[size-1] = '\0';
}


int main()
{
  char ts[80];

  int i = 0;
  while (++i)
 {
   TimeDateStamp(ts);
   printf("[%s]In loop %d\n", ts, i);
  };
  return 0;
}

