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

Improve the docs #27

Open
MylesBorins opened this issue Aug 25, 2020 · 2 comments
Open

Improve the docs #27

MylesBorins opened this issue Aug 25, 2020 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@MylesBorins
Copy link
Member

Currently the documentation for jstime is primarily in the readme. As the API expands it will be good to document using rustdoc so we can have something a bit nicer for folks to refer

@MylesBorins MylesBorins added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Aug 25, 2020
@bdougie
Copy link

bdougie commented Sep 4, 2020

Hey, I spent some time playing with the runtime to think of a more expanded "hello world," and came up with this idea of running a function that setTimeout for 1000ms. In node on my 8 core macbook pro it takes between 2000-3000ms to run. With the deno runtime, it takes 1003ms to run. I think leveraging that example in the jstime docs would be helpful in new folks getting the context of it.

I haven't quite wrapped my brain around how to do that in Rust. Also, setTimeout is also not written in jstime, but curious if there are plans for that or something similar. I will keep thinking through this but thought I would share my intentions for assisting with the docs.

var start = new Date()
var simulateTime = 1000

setTimeout(function (argument) {
  // execution time simulated with setTimeout function
  var end = new Date() - start
  console.info('Execution time: %dms', end)
}, simulateTime)

@MylesBorins
Copy link
Member Author

Did some quick research on what would be needed to implement some basic timers and opened an issue -> #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants