Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plug Thread.Sleep() #543

Closed
fanoI opened this issue Dec 23, 2016 · 9 comments
Closed

Plug Thread.Sleep() #543

fanoI opened this issue Dec 23, 2016 · 9 comments

Comments

@fanoI
Copy link
Contributor

fanoI commented Dec 23, 2016

To plug Thread.Sleep() is needed to program the PIT to trigger an event (an interrupt) to OS when the specified time is elapsed.

See here for more information:
http://wiki.osdev.org/Programmable_Interval_Timer

@xmine64
Copy link

xmine64 commented Dec 24, 2016

You can use this:
var left = "12:30:30";
while (Time.Now.ToString() != left)
{
Sys.Halt();
}

You can calculate left time by adding seconds or minutes to Time.Now.

@fanoI
Copy link
Contributor Author

fanoI commented Dec 24, 2016

Yes but we want the true implementation and correct way is to use PIT.

@jp2masa
Copy link
Member

jp2masa commented Dec 24, 2016

There's a PIT implementation in HAL, but I don't know if it works: https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.HAL/PIT.cs

@jteugels
Copy link

I am willing to take this challenge.

@fanoI
Copy link
Contributor Author

fanoI commented Jan 13, 2017

Perfect @jteugels! If you need help in this task please ask in the Cosmos main chat: https://gitter.im/CosmosOS/Cosmos?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

@fanoI
Copy link
Contributor Author

fanoI commented Mar 8, 2017

Thread.Sleep() seems to be done differently in Net Core so could be needed to be done differently when we merge Net Core... working on this now maybe is a not wanted sovrapposition

@frenzibyte
Copy link
Contributor

#833
This will help for now, it works even for milliseconds

@ewoudje
Copy link
Contributor

ewoudje commented Jan 22, 2018

#863 Fixes this but right now it is going to fast and only works when debugging is disabled

@jp2masa
Copy link
Member

jp2masa commented Feb 25, 2018

Resolved by #867.

@jp2masa jp2masa closed this as completed Feb 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants