Skip to content

Commit

Permalink
fix sec kline bug
Browse files Browse the repository at this point in the history
  • Loading branch information
haipome committed Jun 12, 2017
1 parent ca920f9 commit 79f83bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions marketprice/mp_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,7 @@ json_t *get_market_kline_sec(const char *market, time_t start, time_t end, int i
time_t now = time(NULL);
if (start < now - settings.sec_max)
start = now - settings.sec_max;
start = start / interval * interval;
struct kline_info *kbefor = get_last_kline(info->sec, start - 1, now - settings.sec_max, 1);
struct kline_info *klast = kbefor;
for (; start <= end; start += interval) {
Expand Down

0 comments on commit 79f83bc

Please sign in to comment.