Skip to content

TicksToTime with a Precise LocalTick does not increment linearly #569

@aleevans

Description

@aleevans

General
Unity version: 2022.3.11f
Fish-Networking version: 3.11.13R
Discord link: https://discord.com/channels/424284635074134018/1181725555771576340

Description
When generating a PreciseTick using LocalTick, and then converting the PreciseTick to time, the resulting time value does not increase linearly. It is my understanding that LocalTick should increment linearly. Therefore, the PreciseTick and corresponding time should also increase linearly, but this doesn't appear to be the case.

Replication
Steps to reproduce the behavior:

  1. Add the following snippet to a NetworkBehaviour:
private void Update()
{
  var time = TimeManager.TicksToTime(TimeManager.GetPreciseTick(TickType.LocalTick));
  Debug.Log(time);
}
  1. Note the log messages. I've posted a screenshot of mine below. Note how the time decreases and increases.

Expected behavior
The time should increase only.

Screenshot
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingResolved Pending ReleaseIssue is resolved and will be available on the noted version.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions