diff --git a/lib/include/srslte/common/common.h b/lib/include/srslte/common/common.h index ed5c9acc1..549e992bf 100644 --- a/lib/include/srslte/common/common.h +++ b/lib/include/srslte/common/common.h @@ -122,7 +122,9 @@ public: byte_buffer_t():N_bytes(0) { bzero(buffer, SRSLTE_MAX_BUFFER_SIZE_BYTES); +#ifdef ENABLE_TIMESTAMP timestamp_is_set = false; +#endif msg = &buffer[SRSLTE_BUFFER_HEADER_OFFSET]; next = NULL; #ifdef SRSLTE_BUFFER_POOL_LOG_ENABLED @@ -149,7 +151,9 @@ public: { msg = &buffer[SRSLTE_BUFFER_HEADER_OFFSET]; N_bytes = 0; - timestamp_is_set = false; +#ifdef ENABLE_TIMESTAMP + timestamp_is_set = false; +#endif } uint32_t get_headroom() { @@ -183,8 +187,10 @@ public: private: +#ifdef ENABLE_TIMESTAMP struct timeval timestamp[3]; bool timestamp_is_set; +#endif byte_buffer_t *next; }; @@ -199,6 +205,9 @@ struct bit_buffer_t{ bit_buffer_t():N_bits(0) { msg = &buffer[SRSLTE_BUFFER_HEADER_OFFSET]; +#ifdef ENABLE_TIMESTAMP + timestamp_is_set = false; +#endif } bit_buffer_t(const bit_buffer_t& buf){ N_bits = buf.N_bits; @@ -216,7 +225,9 @@ struct bit_buffer_t{ { msg = &buffer[SRSLTE_BUFFER_HEADER_OFFSET]; N_bits = 0; - timestamp_is_set = false; +#ifdef ENABLE_TIMESTAMP + timestamp_is_set = false; +#endif } uint32_t get_headroom() { @@ -241,10 +252,11 @@ struct bit_buffer_t{ #endif } -private: +private: +#ifdef ENABLE_TIMESTAMP struct timeval timestamp[3]; bool timestamp_is_set; - +#endif }; } // namespace srslte