mirror of https://github.com/PentHertz/srsLTE.git
common: extend timestamp interface for byte_buffer
* allow setting timestamp to a specific std::chrono::time_point * add getter from raw tp
This commit is contained in:
parent
81cfce6cf0
commit
2e64fff1df
|
@ -155,6 +155,8 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
std::chrono::high_resolution_clock::time_point get_timestamp() { return tp; }
|
||||
|
||||
void set_timestamp()
|
||||
{
|
||||
#ifdef ENABLE_TIMESTAMP
|
||||
|
@ -163,6 +165,12 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
void set_timestamp(std::chrono::high_resolution_clock::time_point tp_)
|
||||
{
|
||||
tp = tp_;
|
||||
timestamp_is_set = true;
|
||||
}
|
||||
|
||||
void append_bytes(uint8_t* buf, uint32_t size)
|
||||
{
|
||||
memcpy(&msg[N_bytes], buf, size);
|
||||
|
|
Loading…
Reference in New Issue