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

Add latency method #593

Merged
merged 7 commits into from
Sep 26, 2018
Merged

Add latency method #593

merged 7 commits into from
Sep 26, 2018

Conversation

cxnky
Copy link
Contributor

@cxnky cxnky commented Sep 26, 2018

This adds a method which will be updated whenever a heartbeat is sent, to retrieve the latency in ms.

@cxnky
Copy link
Contributor Author

cxnky commented Sep 26, 2018

resolves #587

wsapi.go Outdated Show resolved Hide resolved
wsapi.go Outdated Show resolved Hide resolved
wsapi.go Outdated Show resolved Hide resolved
@iopred iopred merged commit c855447 into bwmarrin:develop Sep 26, 2018
@iopred
Copy link
Collaborator

iopred commented Sep 26, 2018

Thank you for the PR! <3

@cxnky cxnky deleted the develop branch September 26, 2018 20:23
@bwmarrin bwmarrin added this to the v0.19.0 milestone Nov 2, 2018
ErikMcClure pushed a commit to ErikMcClure/discordgo that referenced this pull request Aug 4, 2020
* Latency method

* fixed typo

* fixed linter error

* Renamed Latency to HeartbeatLatency

* HeartbeatLatency now returns time.Time

* return time.Duration instead, since .Sub() returns that

* Add full-stops to end of comments
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