| 145 | // Only used for backwards compatibility |
| 146 | |
| 147 | static int durationUnitToMultiplier(Duration::Unit u) |
| 148 | { |
| 149 | switch (u) { |
| 150 | case Duration::Unit::SECONDS: |
| 151 | return 1; |
| 152 | case Duration::Unit::MINUTES: |
| 153 | return 60; |
| 154 | case Duration::Unit::HOURS: |
| 155 | return 3600; |
| 156 | case Duration::Unit::DAYS: |
| 157 | return 86400; |
| 158 | default: |
| 159 | break; |
| 160 | } |
| 161 | |
| 162 | return 0; |
| 163 | } |
| 164 | |
| 165 | void Duration::SetUnit(Unit u) |
| 166 | { |