| 994 | } |
| 995 | |
| 996 | ImPlotTime MakeTime(int year, int month, int day, int hour, int min, int sec, int us) { |
| 997 | tm& Tm = GImPlot->Tm; |
| 998 | |
| 999 | int yr = year - 1900; |
| 1000 | if (yr < 0) |
| 1001 | yr = 0; |
| 1002 | |
| 1003 | sec = sec + us / 1000000; |
| 1004 | us = us % 1000000; |
| 1005 | |
| 1006 | Tm.tm_sec = sec; |
| 1007 | Tm.tm_min = min; |
| 1008 | Tm.tm_hour = hour; |
| 1009 | Tm.tm_mday = day; |
| 1010 | Tm.tm_mon = month; |
| 1011 | Tm.tm_year = yr; |
| 1012 | |
| 1013 | ImPlotTime t = MkTime(&Tm); |
| 1014 | |
| 1015 | t.Us = us; |
| 1016 | return t; |
| 1017 | } |
| 1018 | |
| 1019 | int GetYear(const ImPlotTime& t) { |
| 1020 | tm& Tm = GImPlot->Tm; |
no test coverage detected