Manage time in UTC or local timezone.
More... |
| static long | adjustedNowMs () |
| | Get current adjusted date/time, in milliseconds. More...
|
| |
| static void | initialize () |
| | Static initializer (must be called before using sharedInstance())
|
| |
| static bfgTimeManager | sharedInstance () |
| | Get shared instance of this singleton.
|
| |
Manage time in UTC or local timezone.
◆ adjustedDate()
| final Date com.bigfishgames.bfglib.bfgTimeManager.adjustedDate | ( | long | date | ) | |
| inline |
Adjust a date to match the local CDN server date/time timezone delta.
- Parameters
- Returns
- Input date/time adjusted to CDN's timezone
◆ adjustedNowMs()
| static long com.bigfishgames.bfglib.bfgTimeManager.adjustedNowMs | ( | | ) | |
| inlinestatic |
Get current adjusted date/time, in milliseconds.
- Returns
- Current date and time, in milliseconds since Unix epoch, adjusted to server time
◆ getDaysSinceFirstLaunch()
| int com.bigfishgames.bfglib.bfgTimeManager.getDaysSinceFirstLaunch | ( | long | sessionStart | ) | |
| inline |
Get days since install (first launch). NOTE: This is in elapsed 24-hour days, not calendar days.
- Parameters
| sessionStart | Current (or desired) session start date/time to compare against first launch |
- Since
- 6.3
◆ getFirstLaunchDateTime()
| synchronized long com.bigfishgames.bfglib.bfgTimeManager.getFirstLaunchDateTime | ( | | ) | |
| inline |
Get the date/time of first launch, in ms since Unix epoch. NOTE: This method uses the history settings previously used by bfgHistoryReporting, which is now obsolete, so that we use any first launch data previously stored by bfgHistoryReporting for existing app upgrades.
- Returns
- Date/time of first launch, in ms. If never calculated before, the current date/time is used as first launch and stored for future lookups
- Since
- 6.3