| 827 | } |
| 828 | |
| 829 | ImPlotTime MakeTime(int year, int month, int day, int hour, int min, int sec, int us) { |
| 830 | tm& Tm = GImPlot->Tm; |
| 831 | |
| 832 | int yr = year - 1900; |
| 833 | if (yr < 0) |
| 834 | yr = 0; |
| 835 | |
| 836 | sec = sec + us / 1000000; |
| 837 | us = us % 1000000; |
| 838 | |
| 839 | Tm.tm_sec = sec; |
| 840 | Tm.tm_min = min; |
| 841 | Tm.tm_hour = hour; |
| 842 | Tm.tm_mday = day; |
| 843 | Tm.tm_mon = month; |
| 844 | Tm.tm_year = yr; |
| 845 | |
| 846 | ImPlotTime t = MkTime(&Tm); |
| 847 | |
| 848 | t.Us = us; |
| 849 | return t; |
| 850 | } |
| 851 | |
| 852 | int GetYear(const ImPlotTime& t) { |
| 853 | tm& Tm = GImPlot->Tm; |
no test coverage detected