This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
3,207 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
using System.Diagnostics; | ||
using Debug = UnityEngine.Debug; | ||
using UnityEngine; | ||
|
||
namespace Norne.Implementations | ||
{ | ||
internal class DefaultWatchdog : IWatchdog | ||
{ | ||
public float Timeout { get; set; } | ||
private float _timeout; | ||
|
||
public void StartWatchdog(float timeout) | ||
public float Timeout | ||
{ | ||
Timeout = timeout; | ||
Debug.Log("[Watchdog] ANR Watchdog started."); | ||
get => _timeout; | ||
set | ||
{ | ||
Debug.Log($"[Watchdog] Timeout set to {_timeout:F2}s"); | ||
_timeout = value; | ||
} | ||
} | ||
|
||
public void RestartApp() | ||
public void StartWatchdog(float timeout) | ||
{ | ||
Process.GetCurrentProcess().Kill(); | ||
Timeout = timeout; | ||
|
||
Debug.Log("[Watchdog] ANR Watchdog started."); | ||
} | ||
|
||
public string GetStacktrace() | ||
{ | ||
return ""; | ||
return string.Empty; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
{ | ||
"name": "Norne.ANRWatchdog" | ||
} | ||
"name": "Norne.ANRWatchdog", | ||
"rootNamespace": "", | ||
"references": [], | ||
"includePlatforms": [], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": false | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.