Replace float/UInt64 durations by a more precise Time class (#388)
Improve Clock class with atomic RestartIfOver method and allows to choose required precision
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
void LifetimeSystem::Update(float elapsedTime)
|
||||
void LifetimeSystem::Update(Time elapsedTime)
|
||||
{
|
||||
auto view = m_registry.view<LifetimeComponent>();
|
||||
for (auto [entity, lifetimeComponent] : view.each())
|
||||
|
||||
@@ -11,10 +11,10 @@ namespace Nz
|
||||
|
||||
void SystemGraph::Update()
|
||||
{
|
||||
return Update(m_clock.Restart() / 1'000'000.f);
|
||||
return Update(m_clock.Restart());
|
||||
}
|
||||
|
||||
void SystemGraph::Update(float elapsedTime)
|
||||
void SystemGraph::Update(Time elapsedTime)
|
||||
{
|
||||
if (!m_systemOrderUpdated)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user