mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
SCRIPT namespace replacements
This commit is contained in:
committed by
Peter Johnson
parent
ae6c043632
commit
9aca8e0fd6
@@ -5,22 +5,22 @@
|
||||
#include "wpi/cs/cscore_runloop.hpp"
|
||||
#include "wpi/util/Synchronization.h"
|
||||
|
||||
static wpi::Event& GetInstance() {
|
||||
static wpi::Event event;
|
||||
static wpi::util::Event& GetInstance() {
|
||||
static wpi::util::Event event;
|
||||
return event;
|
||||
}
|
||||
|
||||
namespace cs {
|
||||
namespace wpi::cs {
|
||||
|
||||
void RunMainRunLoop() {
|
||||
wpi::Event& event = GetInstance();
|
||||
wpi::WaitForObject(event.GetHandle());
|
||||
wpi::util::Event& event = GetInstance();
|
||||
wpi::util::WaitForObject(event.GetHandle());
|
||||
}
|
||||
|
||||
int RunMainRunLoopTimeout(double timeout) {
|
||||
wpi::Event& event = GetInstance();
|
||||
wpi::util::Event& event = GetInstance();
|
||||
bool timedOut = false;
|
||||
bool signaled = wpi::WaitForObject(event.GetHandle(), timeout, &timedOut);
|
||||
bool signaled = wpi::util::WaitForObject(event.GetHandle(), timeout, &timedOut);
|
||||
if (timedOut) {
|
||||
return 3;
|
||||
}
|
||||
@@ -31,8 +31,8 @@ int RunMainRunLoopTimeout(double timeout) {
|
||||
}
|
||||
|
||||
void StopMainRunLoop() {
|
||||
wpi::Event& event = GetInstance();
|
||||
wpi::util::Event& event = GetInstance();
|
||||
event.Set();
|
||||
}
|
||||
|
||||
} // namespace cs
|
||||
} // namespace wpi::cs
|
||||
|
||||
Reference in New Issue
Block a user