Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int currentTimeHr = tm->hour;
- int currentTimeMin = tm->min;
- int endTimeHr = currentTimeHr + 12;
- int endTimeMin = currentTimeMin;
- int nextIntervalHour = currentTimeHr
- int nextIntervalMin = currentTimeMin + n; //n is interval
- if(nextInvervalMin >= 60) {
- nextIntervalHour++;
- nextIntervalMin -= 60;
- while(currentTimeHr and currentTimeMin != endTimeHr and endTimeMin) {
- //Get new current time and assign it to the variables. Not gonna write this out.
- //When a variable has time from now on, i'm shortening it but I mean to check both the hour AND the minutes.
- if(currentTime == nextIntervalTime) {
- cout << "Good whatever" << endl;
- //Update the interval time to the next interval like I did previously up there ^^^^
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement