Support Board
Date/Time: Sat, 11 Jan 2025 10:33:33 +0000
Post From: The HMS_TIME function
[2016-11-15 05:05:33] |
enemyspy - Posts: 306 |
Hi I am trying to convert 15 minutes into and integer using the method outlined here: http://www.sierrachart.com/index.php?page=doc/SCDateTime.html#TIME_TO_HMS. The purpose is to iterativly initialize The Key values of an STL map container at 15 minute time increments as shown below . It seems to increment the time by approximately 12 minutes instead of the 15. Is the HMS Time Function being used properly in this example? To initialize the container I do this: int Time = HMS_TIME(6,30,0);
int TimeInc = HMS_TIME(0,15,0); int TimeEnd = HMS_TIME(13,15,0); std::map<int,std::map<float,int>> DistributionAtTime; std::map<float,int> Temp; for(int i = Time;Time<=TimeEnd; i+=TimeInc) DistributionAtTime[i] = Temp; |