mirror of
https://github.com/bitwarden/mobile
synced 2025-12-31 15:43:19 +00:00
Use monotonic clock for vault timeout (#1175)
* Use monotonic clock for vault timeout * free memory * removed vault timeout timers and added crash logging to iOS clock hack
This commit is contained in:
@@ -752,6 +752,15 @@ namespace Bit.Droid.Services
|
||||
return false;
|
||||
}
|
||||
|
||||
public long GetActiveTime()
|
||||
{
|
||||
// Returns milliseconds since the system was booted, and includes deep sleep. This clock is guaranteed to
|
||||
// be monotonic, and continues to tick even when the CPU is in power saving modes, so is the recommend
|
||||
// basis for general purpose interval timing.
|
||||
// ref: https://developer.android.com/reference/android/os/SystemClock#elapsedRealtime()
|
||||
return SystemClock.ElapsedRealtime() / 1000;
|
||||
}
|
||||
|
||||
private bool DeleteDir(Java.IO.File dir)
|
||||
{
|
||||
if (dir != null && dir.IsDirectory)
|
||||
|
||||
Reference in New Issue
Block a user