MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / SetAgeText

Method SetAgeText

Libraries/unrar/timefn.cpp:271–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269
270#ifndef SFX_MODULE
271void RarTime::SetAgeText(const wchar *TimeText)
272{
273 uint Seconds=0,Value=0;
274 for (uint I=0;TimeText[I]!=0;I++)
275 {
276 int Ch=TimeText[I];
277 if (IsDigit(Ch))
278 Value=Value*10+Ch-'0';
279 else
280 {
281 switch(etoupper(Ch))
282 {
283 case 'D':
284 Seconds+=Value*24*3600;
285 break;
286 case 'H':
287 Seconds+=Value*3600;
288 break;
289 case 'M':
290 Seconds+=Value*60;
291 break;
292 case 'S':
293 Seconds+=Value;
294 break;
295 }
296 Value=0;
297 }
298 }
299 SetCurrentTime();
300 itime-=uint64(Seconds)*TICKS_PER_SECOND;
301}
302#endif
303
304

Callers 1

SetTimeFiltersMethod · 0.80

Calls 2

IsDigitFunction · 0.85
etoupperFunction · 0.85

Tested by

no test coverage detected