Jump to content

position tick definition


Recommended Posts

HawkXP71
Posted

in the API call /Users/{UserId}/PlayingItems/{Id}/Progress

it states 1 tick = 10,000 ms

This means in order to get the actual number of ms from a tick value, you multiply by 10,000

Except its actually 1 ms = 10,000 ticks. and you have to divide by 10,000

For a particular TV show Im experimenting with, Its paused 2:47 using the emby player.

2:47 = 167 seconds, or 167,000 ms, that means the reported tick position if 1 tick = 10,000 ms, should be 1670 ticks.

However, the returned value is 1,679,452,040 ticks, or  167,945 ms if you divide.

I believe this is simply a mistake in the documentation, but its possible the API is returning the wrong value
 

Posted

Hi, what documentation do you mean?

HawkXP71
Posted

In swagger for the call above

  • 2 weeks later...
Posted

One way to word it is that there are ten million ticks per second.

  • Thanks 1
Posted
On 7/13/2022 at 9:18 PM, HawkXP71 said:

In swagger for the call above

Can you show a screenshot of what you mean? Thanks.

HawkXP71
Posted
3 hours ago, Luke said:

Can you show a screenshot of what you mean? Thanks.

 

Screenshot_20220724-151330_Chrome.jpg

Posted

OK I think the documentation is correct, right? 1 tick = 10000ms. That is true.

HawkXP71
Posted
2 hours ago, Luke said:

OK I think the documentation is correct, right? 1 tick = 10000ms. That is true.

Microsofts docs say otherwise :)

https://docs.microsoft.com/en-us/dotnet/api/system.datetime.ticks?view=net-6.0

"A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond (see TicksPerMillisecond) and 10 million ticks in a second."

Meaning its 1ms = 10000 ticks



 

Posted

Sorry I misread. 1 ms = 10000 ticks.

HawkXP71
Posted
8 minutes ago, Luke said:

Sorry I misread. 1 ms = 10000 ticks.

Yep.  I assume you will file the doc bug? 

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...