Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
TimeUtils.c
Go to the documentation of this file.
1#include "../../Inc/Utils/TimeUtils.h"
2
3double getCurrentTime() {
4 return (double)clock() / CLOCKS_PER_SEC;
5}
6
7double measureInterval(double lastIntervalTime) {
8 double currentTime = getCurrentTime();
9 double interval = currentTime - lastIntervalTime;
10 return interval;
11}
double measureInterval(double lastIntervalTime)
Measures the time interval since the last recorded time.
Definition: TimeUtils.c:7
double getCurrentTime()
Retrieves the current time in seconds.
Definition: TimeUtils.c:3