未验证 提交 93472623 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #3327 from taosdata/feature/os

compile in windows
......@@ -325,7 +325,7 @@ static int64_t getLaunchTimeDelay(const SSqlStream* pStream) {
int64_t delayDelta = maxDelay;
if (pStream->intervalTimeUnit != 'n' && pStream->intervalTimeUnit != 'y') {
delayDelta = pStream->slidingTime * tsStreamComputDelayRatio;
delayDelta = (int64_t)(pStream->slidingTime * tsStreamComputDelayRatio);
if (delayDelta > maxDelay) {
delayDelta = maxDelay;
}
......
......@@ -114,7 +114,7 @@ int64_t taosAddNatualInterval(int64_t key, int64_t intervalTime, char timeUnit,
intervalTime *= 12;
}
int mon = tm.tm_year * 12 + tm.tm_mon + intervalTime;
int mon = (int)(tm.tm_year * 12 + tm.tm_mon + intervalTime);
tm.tm_year = mon / 12;
tm.tm_mon = mon % 12;
......@@ -176,10 +176,10 @@ int64_t taosGetIntervalStartTimestamp(int64_t startTime, int64_t slidingTime, in
if (timeUnit == 'y') {
tm.tm_mon = 0;
tm.tm_year = tm.tm_year / slidingTime * slidingTime;
tm.tm_year = (int)(tm.tm_year / slidingTime * slidingTime);
} else {
int mon = tm.tm_year * 12 + tm.tm_mon;
mon = mon / slidingTime * slidingTime;
mon = (int)(mon / slidingTime * slidingTime);
tm.tm_year = mon / 12;
tm.tm_mon = mon % 12;
}
......
......@@ -155,12 +155,12 @@ static void getNextTimeWindow(SQuery* pQuery, STimeWindow* tw) {
time_t t = (time_t)key;
localtime_r(&t, &tm);
int mon = tm.tm_year * 12 + tm.tm_mon + interval * factor;
int mon = (int)(tm.tm_year * 12 + tm.tm_mon + interval * factor);
tm.tm_year = mon / 12;
tm.tm_mon = mon % 12;
tw->skey = mktime(&tm) * 1000L;
mon += interval;
mon = (int)(mon + interval);
tm.tm_year = mon / 12;
tm.tm_mon = mon % 12;
tw->ekey = mktime(&tm) * 1000L;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册