[Kernel] Add support for positive timeout_ticks
used in NetDll_WSAWaitForMultipleEvents
This commit is contained in:
parent
91c67b9af2
commit
e633bf3d98
|
@ -177,10 +177,8 @@ void XObject::SetAttributes(uint32_t obj_attributes_ptr) {
|
||||||
|
|
||||||
uint32_t XObject::TimeoutTicksToMs(int64_t timeout_ticks) {
|
uint32_t XObject::TimeoutTicksToMs(int64_t timeout_ticks) {
|
||||||
if (timeout_ticks > 0) {
|
if (timeout_ticks > 0) {
|
||||||
// Absolute time, based on January 1, 1601.
|
// NetDll_WSAWaitForMultipleEvents provides timeout in form of MS.
|
||||||
// TODO(benvanik): convert time to relative time.
|
return (uint32_t)timeout_ticks;
|
||||||
assert_always();
|
|
||||||
return 0;
|
|
||||||
} else if (timeout_ticks < 0) {
|
} else if (timeout_ticks < 0) {
|
||||||
// Relative time.
|
// Relative time.
|
||||||
return (uint32_t)(-timeout_ticks / 10000); // Ticks -> MS
|
return (uint32_t)(-timeout_ticks / 10000); // Ticks -> MS
|
||||||
|
|
Loading…
Reference in New Issue