summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2024-06-07 15:06:43 +0200
committerLibravatar GitHub <noreply@github.com>2024-06-07 15:06:43 +0200
commitcc4f773b0e0f45cdb28727853b9d253234a93b56 (patch)
tree455224a7cb489909906eda5778d0e700867358d4 /vendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go
parent[feature] Implement filters_changed stream event (#2972) (diff)
downloadgotosocial-cc4f773b0e0f45cdb28727853b9d253234a93b56.tar.xz
[chore] Update WASM go-sqlite3 to v0.16.1 (#2976)
This includes support for journal mode set to WAL on the BSDs. Relates to: #1753, #2962
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go b/vendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go
index 5c68754f8..83b952b16 100644
--- a/vendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go
+++ b/vendor/github.com/ncruces/go-sqlite3/vfs/os_windows.go
@@ -136,7 +136,7 @@ func osLock(file *os.File, flags, start, len uint32, timeout time.Duration, def
if timeout < time.Since(before) {
break
}
- osSleep(time.Duration(rand.Int63n(int64(time.Millisecond))))
+ time.Sleep(time.Duration(rand.Int63n(int64(time.Millisecond))))
}
}
return osLockErrorCode(err, def)
@@ -171,16 +171,3 @@ func osLockErrorCode(err error, def _ErrorCode) _ErrorCode {
}
return def
}
-
-func osSleep(d time.Duration) {
- if d > 0 {
- period := max(1, d/(5*time.Millisecond))
- if period < 16 {
- windows.TimeBeginPeriod(uint32(period))
- }
- time.Sleep(d)
- if period < 16 {
- windows.TimeEndPeriod(uint32(period))
- }
- }
-}