diff options
author | leongross <[email protected]> | 2024-06-14 14:31:50 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2024-06-15 11:34:06 +0200 |
commit | d513cae5d236cb367632b9cfa81a409b20eee065 (patch) | |
tree | 803b4671936cb3ec838cca3d81a804cc3829d9a0 | |
parent | e612f7cf3f9cea35acb2257c045a5513375b8c74 (diff) | |
download | tinygo-d513cae5d236cb367632b9cfa81a409b20eee065.tar.gz tinygo-d513cae5d236cb367632b9cfa81a409b20eee065.zip |
add SetReadDeadline stub
-rw-r--r-- | src/os/file.go | 7 | ||||
-rw-r--r-- | src/os/file_posix.go | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/os/file.go b/src/os/file.go index e003d47da..acf33f850 100644 --- a/src/os/file.go +++ b/src/os/file.go @@ -23,6 +23,7 @@ import ( "io/fs" "runtime" "syscall" + "time" ) // Seek whence values. @@ -256,6 +257,12 @@ func (f *File) SyscallConn() (conn syscall.RawConn, err error) { return } +// SetReadDeadline sets the deadline for future Read calls and any +// currently-blocked Read call. +func (f *File) SetReadDeadline(t time.Time) error { + return f.setReadDeadline(t) +} + // fd is an internal interface that is used to try a type assertion in order to // call the Fd() method of the underlying file handle if it is implemented. type fd interface { diff --git a/src/os/file_posix.go b/src/os/file_posix.go index b31453d64..e36a6b1cd 100644 --- a/src/os/file_posix.go +++ b/src/os/file_posix.go @@ -8,3 +8,8 @@ import ( func Chtimes(name string, atime time.Time, mtime time.Time) error { return ErrNotImplemented } + +// setReadDeadline sets the read deadline, not yet implemented +func (f *File) setReadDeadline(_ time.Time) error { + return ErrNotImplemented +} |