6#include "Math/Interval.h"
7#include "Math/UnrealMathUtility.h"
8#include "Misc/AssertionMacros.h"
18
19
23 inline constexpr int64
MaxTicks = 9223372036854775807;
26 inline constexpr int64
MinTicks = -9223372036854775807 - 1;
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
85
86
87
88
89
90
91
95 check((InTicks >= ETimespan::MinTicks) && (InTicks <= ETimespan::MaxTicks));
99
100
101
102
103
104
105
106
107
114
115
116
117
118
119
120
121
122
123
124 FTimespan(int32 Days, int32 Hours, int32 Minutes, int32 Seconds)
130
131
132
133
134
135
136
137
138 FTimespan(int32 Days, int32 Hours, int32 Minutes, int32 Seconds, int32 FractionNano)
146
147
148
149
156
157
158
159
167
168
169
170
171
172
179
180
181
182
183
190
191
192
193
194
202
203
204
205
206
213
214
215
216
217
225
226
227
228
229
236
237
238
239
240
248
249
250
251
252
259
260
261
262
263
271
272
273
274
275
282
283
284
285
286
293
294
295
296
297
304
305
306
307
308
315
316
317
318
319
326
327
328
329
330
339
340
341
342
343
344
345
346
347
348
352
353
354
355
362
363
364
365
366
367
368
375
376
377
378
379
386
387
388
389
390
397
398
399
400
407
408
409
410
417
418
419
420
421
428
429
430
431
432
439
440
441
442
443
450
451
452
453
460
461
462
463
464
471
472
473
474
475
482
483
484
485
486
493
494
495
496
497
504
505
506
507
508
515
516
517
518
519
526
527
528
529
530
531
532
533
534
538
539
540
541
542
545 return (
Ticks == 0LL);
549
550
551
552
553
557
558
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
607
608
609
610
611
612
615 return FTimespan((int64)FMath::FloorToDouble(Days * ETimespan::TicksPerDay + 0.5));
619
620
621
622
623
624
627 return FTimespan((int64)FMath::FloorToDouble(Hours * ETimespan::TicksPerHour + 0.5));
631
632
633
634
635
636
639 return FTimespan((int64)FMath::FloorToDouble(Microseconds * ETimespan::TicksPerMicrosecond + 0.5));
643
644
645
646
647
648
651 return FTimespan((int64)FMath::FloorToDouble(Milliseconds * ETimespan::TicksPerMillisecond + 0.5));
655
656
657
658
659
660
663 return FTimespan((int64)FMath::FloorToDouble(Minutes * ETimespan::TicksPerMinute + 0.5));
667
668
669
670
671
672
675 return FTimespan((int64)FMath::FloorToDouble(Seconds * ETimespan::TicksPerSecond + 0.5));
679
680
681
682
683
684
685
692
693
694
695
696
697
698
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
723
724
725
726
727
728
740
741
742
743
744
745
746
757
758
759
760
761
762
766
767
768
769
770
776
777
778
779
780
781
782
783
784 void Assign(int32 Days, int32 Hours, int32 Minutes, int32 Seconds, int32 FractionNano);
787 friend struct Z_Construct_UScriptStruct_FTimespan_Statics;
810
811
812
813
814
FTimespan operator*(float Scalar, const FTimespan &Timespan)
constexpr int64 TicksPerMicrosecond
constexpr int64 TicksPerDay
constexpr int64 TicksPerYear
constexpr int64 NanosecondsPerTick
constexpr int64 TicksPerWeek
constexpr int64 TicksPerMillisecond
constexpr int64 TicksPerMinute
constexpr int64 TicksPerHour
constexpr int64 TicksPerSecond
bool operator==(const FTimespan &Other) const
FTimespan operator*(double Scalar) const
static FTimespan FromDays(double Days)
int32 GetFractionMilli() const
bool operator>=(const FTimespan &Other) const
bool Serialize(FArchive &Ar)
static FTimespan FromHours(double Hours)
FTimespan operator%(const FTimespan &Other) const
bool operator<=(const FTimespan &Other) const
FTimespan & operator-=(const FTimespan &Other)
static FTimespan FromMicroseconds(double Microseconds)
int32 GetFractionNano() const
FTimespan & operator*=(double Scalar)
FTimespan & operator%=(const FTimespan &Other)
bool operator!=(const FTimespan &Other) const
static FTimespan MinValue()
bool NetSerialize(FArchive &Ar, class UPackageMap *Map, bool &bOutSuccess)
FTimespan & operator+=(const FTimespan &Other)
static double Ratio(FTimespan Dividend, FTimespan Divisor)
int32 GetFractionTicks() const
bool operator>(const FTimespan &Other) const
FTimespan operator-() const
friend uint32 GetTypeHash(const FTimespan &Timespan)
static FTimespan FromMinutes(double Minutes)
double GetTotalMicroseconds() const
double GetTotalDays() const
int32 GetFractionMicro() const
FTimespan(int32 Days, int32 Hours, int32 Minutes, int32 Seconds, int32 FractionNano)
double GetTotalSeconds() const
double GetTotalMinutes() const
FTimespan(int32 Days, int32 Hours, int32 Minutes, int32 Seconds)
bool operator<(const FTimespan &Other) const
FTimespan & operator/=(double Scalar)
bool ImportTextItem(const TCHAR *&Buffer, int32 PortFlags, UObject *Parent, FOutputDevice *ErrorText)
FTimespan operator/(double Scalar) const
double GetTotalHours() const
void Assign(int32 Days, int32 Hours, int32 Minutes, int32 Seconds, int32 FractionNano)
static bool Parse(const FString &TimespanString, FTimespan &OutTimespan)
static FTimespan FromSeconds(double Seconds)
double GetTotalMilliseconds() const
FTimespan operator-(const FTimespan &Other) const
FTimespan operator+(const FTimespan &Other) const
FString ToString(const TCHAR *Format) const
static FTimespan MaxValue()
static FTimespan FromMilliseconds(double Milliseconds)
FTimespan(int32 Hours, int32 Minutes, int32 Seconds)
bool ExportTextItem(FString &ValueStr, FTimespan const &DefaultValue, UObject *Parent, int32 PortFlags, UObject *ExportRootScope) const
static FTimespan Lowest()