Skip to content

Commit

Permalink
[v0.0.2] Add UnityClock
Browse files Browse the repository at this point in the history
  • Loading branch information
g0dzZz-coder committed Jan 26, 2025
1 parent bbb2e21 commit 4e9bb6d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Runtime/UnityClock.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: Apache-2.0
// © 2024-2025 Nikolay Melnikov <[email protected]>

using System.Runtime.CompilerServices;

namespace Depra.Time
{
public sealed class UnityClock : IClock
{
float IClock.ElapsedTime
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => UnityEngine.Time.time;
}
}
}
3 changes: 3 additions & 0 deletions Runtime/UnityClock.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Runtime/UnityFrameClock.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// © 2024-2025 Nikolay Melnikov <[email protected]>

using System.Runtime.CompilerServices;

namespace Depra.Time
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.depra.time.unity",
"version": "0.0.1",
"version": "0.0.2",
"displayName": "Depra.Time",
"description": "",
"unity": "2022.3",
Expand Down

0 comments on commit 4e9bb6d

Please sign in to comment.