Replace QUIC with HTTP3/QUIC #43

Merged
nikooo777 merged 18 commits from http3 into master 2020-07-09 15:17:35 +02:00
3 changed files with 29 additions and 8 deletions
Showing only changes of commit 1bf3cb81b3 - Show all commits

17
store/atime_linux.go Normal file
View file

@ -0,0 +1,17 @@
// +build linux
package store
import (
"os"
"syscall"
"time"
)
func timespecToTime(ts syscall.Timespec) time.Time {
return time.Unix(int64(ts.Sec), int64(ts.Nsec))
}
func atime(fi os.FileInfo) time.Time {
return timespecToTime(fi.Sys().(*syscall.Stat_t).Atim)
}

12
store/atime_universal.go Normal file
View file

@ -0,0 +1,12 @@
// +build !linux
package store
import (
"os"
"time"
)
func atime(fi os.FileInfo) time.Time {
return fi.ModTime()
}

View file

@ -227,11 +227,3 @@ func (d *DiskBlobStore) WipeOldestBlobs() (err error) {
} }
return nil return nil
} }
func timespecToTime(ts syscall.Timespec) time.Time {
return time.Unix(int64(ts.Sec), int64(ts.Nsec))
}
func atime(fi os.FileInfo) time.Time {
return timespecToTime(fi.Sys().(*syscall.Stat_t).Atim)
}