Lamp-Da
0.1
A compact lantern project
Loading...
Searching...
No Matches
src
system
platform
time.h
Go to the documentation of this file.
1
5
// do not use pragma once here, has this can be mocked
6
#ifndef PLATFORM_TIME
7
#define PLATFORM_TIME
8
9
#include <stdint.h>
10
11
#ifdef __cplusplus
12
namespace
lampda
{
13
namespace
platform {
14
15
extern
"C"
{
16
#endif
17
24
extern
uint32_t
time_ms
(
void
);
25
36
extern
uint64_t
time_us
(
void
);
37
44
extern
void
delay_ms
(uint32_t dwMs);
45
51
extern
void
delay_us
(uint64_t dwUs);
52
54
inline
uint32_t
time_s
() {
return
time_ms
() / 1000; }
56
inline
uint32_t
time_min
() {
return
time_s
() / 60; }
58
inline
void
delay_s
(uint32_t s) {
delay_ms
(s * 1000); }
59
60
#ifdef __cplusplus
61
}
62
}
// namespace: platform
63
}
// namespace: lampda
64
#endif
65
66
#endif
lampda::platform::time_ms
uint32_t time_ms(void)
Returns the number of milliseconds since the Arduino board began running the current program....
Definition:
time.cpp:16
lampda::platform::delay_us
void delay_us(uint64_t dwUs)
Pauses the program for the amount of time (in microseconds) specified as parameter.
Definition:
time.cpp:22
lampda::platform::delay_ms
void delay_ms(uint32_t dwMs)
Pauses the program for the amount of time (in miliseconds) specified as parameter....
Definition:
time.cpp:20
lampda::platform::delay_s
void delay_s(uint32_t s)
pause the current task for the given number of seconds
Definition:
time.h:58
lampda::platform::time_us
uint64_t time_us(void)
Returns the number of microseconds since the Arduino board began running the current program.
Definition:
time.cpp:18
lampda::platform::time_min
uint32_t time_min()
Get the current time, in minutes.
Definition:
time.h:56
lampda::platform::time_s
uint32_t time_s()
Get the current time, in seconds.
Definition:
time.h:54
lampda
Program scope.
Definition:
control_fixed_modes.hpp:12
Generated by
1.9.6