HawkXP71 99 Posted July 14, 2022 Share Posted July 14, 2022 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 Link to comment Share on other sites More sharing options...
Luke 37113 Posted July 14, 2022 Share Posted July 14, 2022 Hi, what documentation do you mean? Link to comment Share on other sites More sharing options...
HawkXP71 99 Posted July 14, 2022 Author Share Posted July 14, 2022 In swagger for the call above Link to comment Share on other sites More sharing options...
harrv 88 Posted July 24, 2022 Share Posted July 24, 2022 One way to word it is that there are ten million ticks per second. 1 Link to comment Share on other sites More sharing options...
Luke 37113 Posted July 24, 2022 Share Posted July 24, 2022 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. Link to comment Share on other sites More sharing options...
HawkXP71 99 Posted July 24, 2022 Author Share Posted July 24, 2022 3 hours ago, Luke said: Can you show a screenshot of what you mean? Thanks. Link to comment Share on other sites More sharing options...
Luke 37113 Posted July 24, 2022 Share Posted July 24, 2022 OK I think the documentation is correct, right? 1 tick = 10000ms. That is true. Link to comment Share on other sites More sharing options...
HawkXP71 99 Posted July 25, 2022 Author Share Posted July 25, 2022 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 Link to comment Share on other sites More sharing options...
Luke 37113 Posted July 25, 2022 Share Posted July 25, 2022 Sorry I misread. 1 ms = 10000 ticks. Link to comment Share on other sites More sharing options...
HawkXP71 99 Posted July 25, 2022 Author Share Posted July 25, 2022 8 minutes ago, Luke said: Sorry I misread. 1 ms = 10000 ticks. Yep. I assume you will file the doc bug? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now