mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
Of course, the timespec_from_ms function must return its result.
This commit is contained in:
parent
5820056aef
commit
3f2ed36849
@ -99,6 +99,7 @@ timespec_from_ms (const uint32_t millis)
|
||||
timespec time;
|
||||
time.tv_sec = millis / 1e3;
|
||||
time.tv_nsec = (millis - (time.tv_sec * 1e3)) * 1e6;
|
||||
return time;
|
||||
}
|
||||
|
||||
Serial::SerialImpl::SerialImpl (const string &port, unsigned long baudrate,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user