-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tim Cooper
committed
Nov 21, 2014
1 parent
27af6b4
commit 9f45f7a
Showing
4 changed files
with
87 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package gumble | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
type UserStats struct { | ||
version Version | ||
connected time.Time | ||
idle time.Duration | ||
} | ||
|
||
// Version returns the user's version. | ||
func (us *UserStats) Version() Version { | ||
return us.version | ||
} | ||
|
||
// Connected returns when the user connected to the server. | ||
func (us *UserStats) Connected() time.Time { | ||
return us.connected | ||
} | ||
|
||
// Idle returns how long the user has been idle. | ||
func (us *UserStats) Idle() time.Duration { | ||
return us.idle | ||
} |