Van::GetTimestamp(), a bug or not?
Open
- Dominant language
- C++
- Stars
- 1.6k
- Forks
- 540
- PR merge metrics
- No merged PRs in 30d
Description
include/ps/internal/van.h:
63 /**
64 * \brief get next available timestamp. thread safe
65 */
66 int GetTimestamp() { return timestamp_++; }
126 std::atomic timestamp_{0};
The implementation of GetTimestamp and its comment don't match. GetTimestamp doesn't get "next" availabe timestamp but the current logic timestamp.
Meanwhile timestamp_ is initialized as zero.
So the first call to GetTimestamp will return zero. Is it okay?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.