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

Set NewFakeClock initial time #2

Closed
dghubble opened this issue Aug 22, 2015 · 3 comments
Closed

Set NewFakeClock initial time #2

dghubble opened this issue Aug 22, 2015 · 3 comments

Comments

@dghubble
Copy link

Using NewFakeClock() to make a Clock at a specific point in time requires a custom implementation (since fakeClock is internal) or calling Advance while depending on the internal detail that the clock starts in 1900. Is this within the desired project scope?

I previously considered this package for some testing which depended on a specific timestamp for validations.

@jonboulle
Copy link
Owner

Certainly open to this, just hadn't wanted to clutter up the interfaces. Any suggestions for a name? NewFakeClockAt(time.Time) or something?

@dghubble
Copy link
Author

NewFakeClockAt sounds great and it matches the signature I was using to create a Clock 👍

@jonboulle
Copy link
Owner

Fixed in c30457e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants