kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Trying to add the unit of time in variable name

Open mapleFU opened this issue 1 year ago • 6 comments
trafficstars

Cron Job is remain unchanged

mapleFU avatar Apr 26 '24 20:04 mapleFU

@mapleFU Can we have int64_t instead of time_t everywhere? Maybe just rename these variables as timestamp and add a comment // in seconds/in milliseconds? WDYT?

torwig avatar Apr 27 '24 06:04 torwig

Both is ok for me. Currently the different "time" is really confusing, any possible change is ok

mapleFU avatar Apr 27 '24 07:04 mapleFU

@git-hulk @PragmaTwice Would you mind take a look? I can accept any idea here.

mapleFU avatar Apr 28 '24 05:04 mapleFU

@mapleFU It looks great with the unit of time. But some places are using _secs and _sec as the suffix, perhaps we can keep them consistent.

git-hulk avatar Apr 28 '24 05:04 git-hulk

I think the best idea is to use some types with unit like chrono::duration, but the affected code range will be very large. So currently you can add unit to variable names.

PragmaTwice avatar Apr 28 '24 05:04 PragmaTwice