Skip to content

Add atomic.Time#98

Merged
sywhang merged 9 commits into
uber-go:masterfrom
sywhang:add-time
Jun 22, 2021
Merged

Add atomic.Time#98
sywhang merged 9 commits into
uber-go:masterfrom
sywhang:add-time

Conversation

@sywhang

@sywhang sywhang commented Jun 17, 2021

Copy link
Copy Markdown
Contributor

Add atomic.Time which wraps time.Time and supports the following atomic operations:

func (t *Time) Load() time.Time
func (t* Time) Store(val time.Time)

For #48

@codecov

codecov Bot commented Jun 17, 2021

Copy link
Copy Markdown

Codecov Report

Merging #98 (404191b) into master (6a01446) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #98   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        18    +2     
  Lines          171       181   +10     
=========================================
+ Hits           171       181   +10     
Impacted Files Coverage Δ
time.go 100.00% <100.00%> (ø)
time_ext.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a01446...404191b. Read the comment docs.

Comment thread time_ext.go
Comment thread time_ext.go Outdated
Comment thread time_test.go

@abhinav abhinav left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a reasonable start for this. We can add more extensions to the atomic.Time type in the future.

Comment thread time_ext.go Outdated
Comment thread time_test.go Outdated
Comment thread time_test.go Outdated
Comment thread time_test.go Outdated
@sywhang sywhang merged commit 557b938 into uber-go:master Jun 22, 2021
@sywhang sywhang deleted the add-time branch June 22, 2021 07:36
@sywhang sywhang mentioned this pull request Jun 22, 2021
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

Successfully merging this pull request may close these issues.

3 participants