ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/truck/DashInterface/Display.cpp
(Generate patch)

Comparing DashInterface/Display.cpp (file contents):
Revision 36 by douglas, 2008-03-04T22:24:35-08:00 vs.
Revision 37 by douglas, 2008-03-05T02:29:38-08:00

# Line 6 | Line 6
6  
7   #include <foreach.hpp>
8   #include <scopes.hpp>
9 + #include <timing.hpp>
10  
11   #include <iomanip>
12   #include <iostream>
# Line 175 | Line 176 | void Display::Communicate_()
176                                  responsesCondition.Signal();
177                          }
178  
179 < next:   ::usleep(10000);
179 > next:   Timing::NanoSleep(Timing::Time(0, 10000000));
180          }
181   }
182  
# Line 192 | Line 193 | retry:
193                  while (responses.empty())
194                          try
195                          {
196 <                                timeval when;
196 <
197 <                                ::gettimeofday(&when, NULL);
198 <
199 <                                timespec wait;
200 <
201 <                                TIMEVAL_TO_TIMESPEC(&when, &wait);
202 <
203 <                                ++wait.tv_sec;
204 <
205 <                                responsesCondition.Wait(wait);
196 >                                responsesCondition.Wait(Timing::GetTimeOfDay() += 1);
197                          }
198                          catch (const Posix::Error &error)
199                          {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines