bodil / bodil/purescript-signal

"now" won't return current Unix time if perf presented

Open
#69 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PureScript
Stars
260
Forks
41
PR merge metrics
No merged PRs in 30d

Description

I've tried using `Signal.Time.every` in a Elm-like fashion (sending messages with a Unix timestamp applied), but instead it returns time from the session (kinda) start, because it relies on `performance` and `process`, using `Date.now` as a fallback only.

The closest workaround is copying `everyP` and re-implementing `now` in own foreign module.

But either or both:
* the documentation really should note that moment (from which JS object it takes current time)
* `every` instance for Unix time dispatching should be presented

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing Signal.Time.every, everyP, and now, especially how they use performance, process, and Date.now. Decide whether the intended fix is to document which JavaScript time source is used or to provide an every variant that dispatches Unix time, then verify the chosen behavior against the issue's workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.