Fixes
This commit is contained in:
@ -52,6 +52,11 @@ namespace IACore
|
||||
return std::chrono::duration_cast<std::chrono::seconds>(HighResClock::now() - g_startTime).count();
|
||||
}
|
||||
|
||||
FLOAT32 GetRandom()
|
||||
{
|
||||
return static_cast<FLOAT32>(rand()) / static_cast<FLOAT32>(RAND_MAX);
|
||||
}
|
||||
|
||||
UINT32 GetRandom(IN UINT32 seed)
|
||||
{
|
||||
srand(seed);
|
||||
|
||||
@ -360,10 +360,19 @@ namespace IACore
|
||||
[sid](IN StringView line) {
|
||||
UNUSED(sid);
|
||||
UNUSED(line);
|
||||
#if __IA_DEBUG
|
||||
puts(std::format(__CC_MAGENTA "[Node:{}:STDOUT|STDERR]: {}" __CC_DEFAULT, sid, line).c_str());
|
||||
#endif
|
||||
},
|
||||
[sid](IN Expected<INT32, String> result) {
|
||||
UNUSED(sid);
|
||||
UNUSED(result);
|
||||
#if __IA_DEBUG
|
||||
if (!result)
|
||||
puts(std::format(__CC_RED "Failed to spawn Node: {} with error '{}'" __CC_DEFAULT, sid, result.error()).c_str());
|
||||
else
|
||||
puts(std::format(__CC_RED "[Node: {}]: Exited with code {}" __CC_DEFAULT, sid, *result).c_str());
|
||||
#endif
|
||||
});
|
||||
|
||||
// Give some time for child node to stablize
|
||||
|
||||
@ -31,6 +31,7 @@ namespace IACore
|
||||
UINT64 GetTicksCount();
|
||||
FLOAT64 GetSecondsCount();
|
||||
|
||||
FLOAT32 GetRandom();
|
||||
UINT32 GetRandom(IN UINT32 seed);
|
||||
INT64 GetRandom(IN INT64 min, IN INT64 max);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user