mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 18:53:29 +00:00
add SetReadDeadline stub
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
|||||||
"io/fs"
|
"io/fs"
|
||||||
"runtime"
|
"runtime"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Seek whence values.
|
// Seek whence values.
|
||||||
@@ -256,6 +257,12 @@ func (f *File) SyscallConn() (conn syscall.RawConn, err error) {
|
|||||||
return
|
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
|
// 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.
|
// call the Fd() method of the underlying file handle if it is implemented.
|
||||||
type fd interface {
|
type fd interface {
|
||||||
|
|||||||
@@ -8,3 +8,8 @@ import (
|
|||||||
func Chtimes(name string, atime time.Time, mtime time.Time) error {
|
func Chtimes(name string, atime time.Time, mtime time.Time) error {
|
||||||
return ErrNotImplemented
|
return ErrNotImplemented
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// setReadDeadline sets the read deadline, not yet implemented
|
||||||
|
func (f *File) setReadDeadline(_ time.Time) error {
|
||||||
|
return ErrNotImplemented
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user