Now you can download a copy of these docs so you can use them offline! Download now
System.cpp
1 /*
2  * System.cpp
3  *
4  * Created on: Sep 26, 2012
5  * Author: Mitchell Wills
6  */
7 
8 #include "networktables2/util/System.h"
9 #include "semLib.h"
10 #include <stdio.h>
11 #include <sysLib.h> // for sysClkRateGet
12 #include <usrLib.h> // for taskDelay
13 
14 void sleep_ms(unsigned long ms){
15  taskDelay((INT32)((double)sysClkRateGet() * ms / 1000));
16 }
17 unsigned long currentTimeMillis(){
18  struct timespec tp;
19  clock_gettime(CLOCK_REALTIME,&tp);
20  return tp.tv_sec*1000 + tp.tv_nsec/1000;
21 }
22 void writeWarning(const char* message){
23  fprintf(stderr, "%s\n", message);
24  fflush(stderr);
25  //TODO implement write warning with wpilib error stuff
26 }

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6