getTimeStamp signature
fl4p opened this issue · comments
Hi,
thanks for this lib.
Signature of getTimeStamp(struct timeval *tv, int secFracDigits)
should be
getTimeStamp(const struct timeval *tv, int secFracDigits)
, so we don't have to cast away the const when using this func externally.
Or even better, consider using references to match the general C++ style:
getTimeStamp(const struct timeval &tv, int secFracDigits)
Thanks, @fl4p, for the feedback.
I admit there should be the const
qualified before struct timeval *tv
.
However, its usage should stay idiomatic. As the struct timeval
is from C time API, it is mostly used as a pointer and it is better to keep it so.