ndn-embeds 0.1.0
Lightweight NDN protocol stack for embedded systems
Loading...
Searching...
No Matches
common.cpp
1#include "ndn/common.hpp"
2#include "esp_random.h"
3#include "esp_timer.h"
4
5namespace ndn {
6
8 return static_cast<TimeMs>(esp_timer_get_time() / 1000);
9}
10
12 return esp_random();
13}
14
15} // namespace ndn
Common definitions for the NDN protocol stack.
TimeMs currentTimeMs()
Get current time (milliseconds)
Definition common.cpp:7
uint64_t TimeMs
Timestamp type (milliseconds)
Definition common.hpp:107
uint32_t generateRandomNonce()
Generate a random Nonce value.
Definition common.cpp:11