mirror of
https://github.com/hamburghammer/grcon.git
synced 2024-12-23 13:37:43 +01:00
Augusto Dwenger J
1cda9ca591
Initially it was the idea that this would be version 2 of the https://github.com/hamburghammer/rcon lib but I changed my mind and decided to make a new Project out of it. It has formally nothing to do with the original lib.
12 lines
268 B
Go
12 lines
268 B
Go
package util
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/hamburghammer/grcon"
|
|
)
|
|
|
|
// GenerateRequestId is a convenience function to generate an id using the current time.
|
|
func GenerateRequestId() grcon.PacketId {
|
|
return grcon.PacketId((time.Now().UnixNano() / 100000) % 100000)
|
|
}
|