Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
CptMercury

High Precision computer.pull/event.pull

Recommended Posts

@payonel

Hey,

I was wondering if there is any chance to see a high precision computer.pull function in OpenComputers, allowing to have timeouts below one tick (I believe the currently used computer.uptime only returns time with .05 s precision).

With that in hand, non-blocking sleeps and timers for small time intervals should be realizable. I was trying to implement this in openOS by adding a computer.pull function using os.clock instead of computer.uptime and changing some other libs accordingly, but it didn't work out.

So I'm asking if there is any reason against adding a higher precision version of computer.pull to "machine"?

Thanks:)

Share this post


Link to post
Share on other sites

for a polite server load, we let the minecraft server runtime decide when to pick back up our threads, and thus we cannot give lower precision that we currently have.

Share this post


Link to post
Share on other sites

Ok, I forgot the program doesn‘t always run in the executor thread.

Too bad there are only ways to have blocking high precision sleeps and timers and no non-blocking alternatives...

But anyways, thanks alot :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.