typedef struct ControlData {
ControlModes current_mode;
pthread_mutex_t mutex;
- struct timeval start_time;
+ struct timespec start_time;
char user_name[31]; // The user who owns the currently running experiment
} ControlData;
FILE *fp = fopen((const char*) arg, "a");
if (fp) {
fclose(fp);
- gettimeofday(&(g_controls.start_time), NULL);
+ clock_gettime(CLOCK_MONOTONIC, &(g_controls.start_time));
} else
ret = "Cannot open experiment name marker";
}
* Gets the start time for the current experiment
* @return the start time
*/
-const struct timeval* Control_GetStartTime() {
+const struct timespec * Control_GetStartTime() {
return &g_controls.start_time;
}