mirror of
https://github.com/valitydev/limiter.git
synced 2024-11-06 00:55:22 +00:00
Merge pull request #4 from rbkmoney/ED-156/ft/add_latest_clock
fix same usec
This commit is contained in:
commit
c5572a9a22
@ -269,8 +269,8 @@ get_handler(ID, LimitContext) ->
|
||||
-spec calculate_time_range(timestamp(), config()) -> time_range().
|
||||
calculate_time_range(Timestamp, Config) ->
|
||||
StartedAt = started_at(Config),
|
||||
{StartDateTime, USec} = lim_range_codec:parse_timestamp(StartedAt),
|
||||
{CurrentDateTime, USec} = lim_range_codec:parse_timestamp(Timestamp),
|
||||
{StartDateTime, _USec0} = lim_range_codec:parse_timestamp(StartedAt),
|
||||
{CurrentDateTime, _USec1} = lim_range_codec:parse_timestamp(Timestamp),
|
||||
CurrentSec = calendar:datetime_to_gregorian_seconds(CurrentDateTime),
|
||||
case time_range_type(Config) of
|
||||
{calendar, Range} ->
|
||||
|
Loading…
Reference in New Issue
Block a user