brewco/util.c

changeset 480
1992db823b7e
parent 471
1564b60558b1
equal deleted inserted replaced
479:0e6a1163e6e3 480:1992db823b7e
22 22
23 #include "brewco.h" 23 #include "brewco.h"
24 #include "util.h" 24 #include "util.h"
25 #include "slcd.h" 25 #include "slcd.h"
26 26
27 27 #ifdef HAVE_WIRINGPI_H
28 extern int lcdHandle;
29 #endif
28 extern int slcdHandle; 30 extern int slcdHandle;
29 31
30 32
31 /* 33 /*
32 * Make directory tree, the name must end with a / 34 * Make directory tree, the name must end with a /
140 142
141 return 0; 143 return 0;
142 } 144 }
143 145
144 146
145 147 #ifndef HAVE_WIRINGPI_H
146 long millis(void) 148 long millis(void)
147 { 149 {
148 struct timespec now; 150 struct timespec now;
149 151
150 clock_gettime(CLOCK_REALTIME , &now); 152 clock_gettime(CLOCK_REALTIME , &now);
151 return ((now.tv_sec * 1000000000) + now.tv_nsec) / 1000000; 153 return ((now.tv_sec * 1000000000) + now.tv_nsec) / 1000000;
152 } 154 }
153 155 #endif
154 156
155 157
156 void hlt_status(int value) 158 void hlt_status(int value)
157 { 159 {
158 #ifdef HAVE_WIRINGPI_H 160 #ifdef HAVE_WIRINGPI_H

mercurial