MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / MakeTime

Function MakeTime

Source/3rdParty/implot/implot.cpp:996–1017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

994}
995
996ImPlotTime 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
1019int GetYear(const ImPlotTime& t) {
1020 tm& Tm = GImPlot->Tm;

Callers 3

GetDateTimeWidthFunction · 0.85
Locator_TimeFunction · 0.85
ShowDatePickerFunction · 0.85

Calls 1

MkTimeFunction · 0.85

Tested by

no test coverage detected