git.ucc.asn.au
/
matches
/
MCTX3420.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add define for compiling under RTLinux
[matches/MCTX3420.git]
/
server
/
control.c
diff --git
a/server/control.c
b/server/control.c
index
c6b5823
..
776cdd1
100644
(file)
--- a/
server/control.c
+++ b/
server/control.c
@@
-12,7
+12,7
@@
typedef struct ControlData {
ControlModes current_mode;
pthread_mutex_t mutex;
typedef struct ControlData {
ControlModes current_mode;
pthread_mutex_t mutex;
- struct time
val
start_time;
+ struct time
spec
start_time;
char user_name[31]; // The user who owns the currently running experiment
} ControlData;
char user_name[31]; // The user who owns the currently running experiment
} ControlData;
@@
-201,7
+201,7
@@
const char* Control_SetMode(ControlModes desired_mode, void * arg)
FILE *fp = fopen((const char*) arg, "a");
if (fp) {
fclose(fp);
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";
}
} else
ret = "Cannot open experiment name marker";
}
@@
-258,6
+258,6
@@
const char * Control_GetModeName() {
* Gets the start time for the current experiment
* @return the start time
*/
* Gets the start time for the current experiment
* @return the start time
*/
-const struct time
val
* Control_GetStartTime() {
+const struct time
spec
* Control_GetStartTime() {
return &g_controls.start_time;
}
return &g_controls.start_time;
}
UCC
git Repository :: git.ucc.asn.au