FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kTimeSpan.h
1 //This header is deprecated and will be removed in an upcoming release.
2 //Please replace the use of any functions defined in this header with
3 //the recommended replacements (see comments, below).
4 #ifndef K_FIRESYNC_TIME_SPAN_H
5 #define K_FIRESYNC_TIME_SPAN_H
6 
7 #include <kApi/Utils/kTimeSpan.h>
8 
9 //[Deprecated] Replace with kTimeSpan_FromMicroseconds64s
10 #define kTimeSpan_FromTicks kTimeSpan_FromMicroseconds64s
11 
12 //[Deprecated] Modify code to use kTimeSpan_FromParts (microseconds instead of milliseconds)
13 kInlineFx(kTimeSpan) kTimeSpan_FromPartsMs(k32s days, k32s hours, k32s minutes, k32s seconds, k32s milliseconds)
14 {
15  return kTimeSpan_FromParts(days, hours, minutes, seconds, milliseconds * 1000);
16 }
17 
18 //[Deprecated] Replace with kTimeSpan_FromDays64f
19 #define kTimeSpan_FromTotalDays kTimeSpan_FromDays64f
20 
21 //[Deprecated] Replace with kTimeSpan_FromHours64f
22 #define kTimeSpan_FromTotalHours kTimeSpan_FromHours64f
23 
24 //[Deprecated] Replace with kTimeSpan_FromMinutes64f
25 #define kTimeSpan_FromTotalMinutes kTimeSpan_FromMinutes64f
26 
27 //[Deprecated] Replace with kTimeSpan_FromSeconds64f
28 #define kTimeSpan_FromTotalSeconds kTimeSpan_FromSeconds64f
29 
30 //[Deprecated] Replace with kTimeSpan_FromMilliseconds64f
31 #define kTimeSpan_FromTotalMilliseconds kTimeSpan_FromMilliseconds64f
32 
33 //[Deprecated] Modify code to use kTimeSpan_Parts (microseconds instead of milliseconds)
34 kInlineFx(kStatus) kTimeSpan_PartsMs(kTimeSpan span, k32s* days, k32s* hours, k32s* minutes, k32s* seconds, k32s* milliseconds)
35 {
36  kCheck(kTimeSpan_Parts(span, days, hours, minutes, seconds, milliseconds));
37 
38  if (!kIsNull(milliseconds))
39  {
40  *milliseconds /= 1000;
41  }
42 
43  return kOK;
44 }
45 
46 //[Deprecated] Replace with kTimeSpan_DaysPart
47 #define kTimeSpan_Days kTimeSpan_DaysPart
48 
49 //[Deprecated] Replace with kTimeSpan_HoursPart
50 #define kTimeSpan_Hours kTimeSpan_HoursPart
51 
52 //[Deprecated] Replace with kTimeSpan_MinutesPart
53 #define kTimeSpan_Minutes kTimeSpan_MinutesPart
54 
55 //[Deprecated] Replace with kTimeSpan_SecondsPart
56 #define kTimeSpan_Seconds kTimeSpan_SecondsPart
57 
58 //[Deprecated] Convert to use kTimeSpan_MicrosecondsPart
59 kInlineFx(k32s) kTimeSpan_Milliseconds(kTimeSpan span)
60 {
61  return (k32s) kTimeSpan_MicrosecondsPart(span) / 1000;
62 }
63 
64 //[Deprecated] Replace with kTimeSpan_ToMicroseconds64s
65 #define kTimeSpan_Ticks kTimeSpan_ToMicroseconds64s
66 
67 //[Deprecated] Replace with kTimeSpan_ToDays64f
68 #define kTimeSpan_TotalDays kTimeSpan_ToDays64f
69 
70 //[Deprecated] Replace with kTimeSpan_ToHours64f
71 #define kTimeSpan_TotalHours kTimeSpan_ToHours64f
72 
73 //[Deprecated] Replace with kTimeSpan_ToMinutes64f
74 #define kTimeSpan_TotalMinutes kTimeSpan_ToMinutes64f
75 
76 //[Deprecated] Replace with kTimeSpan_ToSeconds64f
77 #define kTimeSpan_TotalSeconds kTimeSpan_ToSeconds64f
78 
79 //[Deprecated] Replace with kTimeSpan_ToMilliseconds64f
80 #define kTimeSpan_TotalMilliseconds kTimeSpan_ToMilliseconds64f
81 
82 //[Deprecated] Replace with integer addition
83 kInlineFx(kTimeSpan) kTimeSpan_Add(kTimeSpan a, kTimeSpan b)
84 {
85  return a + b;
86 }
87 
88 //[Deprecated] Replace with integer subtraction
89 kInlineFx(kTimeSpan) kTimeSpan_Subtract(kTimeSpan a, kTimeSpan b)
90 {
91  return a - b;
92 }
93 
94 #endif
#define kIsNull(POINTER)
#define kCheck(EXPRESSION)
#define kInlineFx(TYPE)
#define kOK