23 lines
421 B
C
23 lines
421 B
C
/**
|
|
* Copyright (c) 2024 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#include "game/time.h"
|
|
#include "assert/assert.h"
|
|
|
|
dawntime_t TIME;
|
|
|
|
void timeInit() {
|
|
TIME.delta = 0.0f;
|
|
TIME.time = 0.0f;
|
|
}
|
|
|
|
void timeUpdate(const float_t delta) {
|
|
assertTrue(delta > 0, "time delta must be greater than 0.");
|
|
|
|
TIME.delta = delta;
|
|
TIME.time += delta;
|
|
} |