tests run (but not pass) and fine-tuning (specially tag filters) on filter_easyjson.go
This commit is contained in:
13
timestamp.go
Normal file
13
timestamp.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package nostr
|
||||
|
||||
import "time"
|
||||
|
||||
type Timestamp int64
|
||||
|
||||
func Now() Timestamp {
|
||||
return Timestamp(time.Now().Unix())
|
||||
}
|
||||
|
||||
func (t Timestamp) Time() time.Time {
|
||||
return time.Unix(int64(t), 0)
|
||||
}
|
||||
Reference in New Issue
Block a user