@@ -142,7 +142,7 @@ int mainloop(){
142
142
//Start of file code
143
143
GPIO_CLR = 1 <<GPI ;
144
144
145
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
145
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
146
146
firstTime = gettime_now .tv_nsec ;
147
147
totalFirstTime = firstTime ;
148
148
@@ -153,27 +153,27 @@ int mainloop(){
153
153
tempAddress = readMem (++ regPC ).data ;
154
154
instAddr |= (tempAddress << 12 );
155
155
156
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
156
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
157
157
while ((gettime_now .tv_nsec - firstTime ) < period )
158
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
158
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
159
159
GPIO_SET = 1 <<GPI ;
160
160
firstTime = gettime_now .tv_nsec ;
161
161
162
162
tempAddress = readMem (++ regPC ).data ;
163
163
instAddr |= (tempAddress << 8 );
164
164
165
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
165
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
166
166
while ((gettime_now .tv_nsec - firstTime ) < period )
167
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
167
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
168
168
GPIO_CLR = 1 <<GPI ;
169
169
firstTime = gettime_now .tv_nsec ;
170
170
171
171
tempAddress = readMem (++ regPC ).data ;
172
172
instAddr |= (tempAddress << 4 );
173
173
174
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
174
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
175
175
while ((gettime_now .tv_nsec - firstTime ) < period )
176
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
176
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
177
177
GPIO_SET = 1 <<GPI ;
178
178
firstTime = gettime_now .tv_nsec ;
179
179
@@ -182,9 +182,9 @@ int mainloop(){
182
182
instAddr |= (tempAddress );
183
183
regPC ++ ;
184
184
185
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
185
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
186
186
while ((gettime_now .tv_nsec - firstTime ) < period )
187
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
187
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
188
188
GPIO_CLR = 1 <<GPI ;
189
189
firstTime = gettime_now .tv_nsec ;
190
190
@@ -208,9 +208,9 @@ int mainloop(){
208
208
else
209
209
shutdown (UNKNOWNINSTRUCTIONERROR );
210
210
211
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
211
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
212
212
while ((gettime_now .tv_nsec - firstTime ) < period )
213
- clock_gettime (CLOCK_MONOTONIC , & gettime_now );
213
+ clock_gettime (CLOCK_REALTIME ) , & gettime_now );
214
214
firstTime = gettime_now .tv_nsec ;
215
215
216
216
0 commit comments