Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for mtime (0.57 sec)

  1. src/cmd/go/testdata/script/build_issue6480.txt

    package main
    
    import (
    	"encoding/json"
    	"fmt"
    	"os"
    	"time"
    )
    
    func truncateLike(t, p time.Time) time.Time {
    	nano := p.UnixNano()
    	d := 1 * time.Nanosecond
    	for nano%int64(d) == 0 && d < 1*time.Second {
    		d *= 10
    	}
    	for nano%int64(d) == 0 && d < 2*time.Second {
    		d *= 2
    	}
    	return t.Truncate(d)
    }
    
    func main() {
    	var t1 time.Time
    	b1, err := os.ReadFile(os.Args[1])
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  2. src/cmd/go/testdata/script/issue53586.txt

    [short] skip  # sleeps to make mtime cacheable
    
    go mod init example
    
    cd subdir
    go mod init example/subdir
    sleep 2s  # allow go.mod mtime to be cached
    
    go list -f '{{.Dir}}: {{.ImportPath}}' ./pkg
    stdout $PWD${/}pkg': example/subdir/pkg$'
    
    rm go.mod  # expose ../go.mod
    
    go list -f '{{.Dir}}: {{.ImportPath}}' ./pkg
    stdout $PWD${/}pkg': example/subdir/pkg$'
    
    -- subdir/pkg/pkg.go --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 30 18:20:39 UTC 2022
    - 394 bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/test_race_install_cgo.txt

    ? go test -race -i runtime/race
    
    exec $GOBIN/mtime cgopath.txt # get the mtime of the file whose name is in cgopath.txt
    cp stdout cgotime_after.txt
    exec $GOBIN/sametime cgotime_before.txt cgotime_after.txt
    
    -- go.mod --
    module m
    
    go 1.16
    -- mtime/mtime.go --
    package main
    
    import (
    	"encoding/json"
    	"fmt"
    	"os"
    	"strings"
    )
    
    func main() {
    	b, err := os.ReadFile(os.Args[1])
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 27 14:03:15 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  4. src/cmd/go/testdata/script/test_cache_inputs.txt

    }
    
    func TestBenchtime(t *testing.T) {
    }
    
    -- mkold.go --
    package main
    
    import (
    	"log"
    	"os"
    	"time"
    )
    
    func main() {
    	d, err := time.ParseDuration(os.Args[1])
    	if err != nil {
    		log.Fatal(err)
    	}
    	path := os.Args[2]
    	old := time.Now().Add(-d)
    	err = os.Chtimes(path, old, old)
    	if err != nil {
    		log.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 22:23:53 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  5. api/go1.5.txt

    pkg math/big, type RoundingMode uint8
    pkg mime, const BEncoding = 98
    pkg mime, const BEncoding WordEncoder
    pkg mime, const QEncoding = 113
    pkg mime, const QEncoding WordEncoder
    pkg mime, func ExtensionsByType(string) ([]string, error)
    pkg mime, method (*WordDecoder) Decode(string) (string, error)
    pkg mime, method (*WordDecoder) DecodeHeader(string) (string, error)
    pkg mime, method (WordEncoder) Encode(string, string) string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 30 21:14:09 UTC 2015
    - 46.6K bytes
    - Viewed (0)
  6. src/cmd/go/testdata/script/fsys_walk.txt

    # Test that go list prefix... does not read directories not beginning with prefix.
    env GODEBUG=gofsystrace=1
    go list m...
    stderr mime
    stderr mime[\\/]multipart
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 12 09:11:26 UTC 2022
    - 177 bytes
    - Viewed (0)
  7. doc/next/6-stdlib/1-time.md

    ### Timer changes
    
    Go 1.23 makes two significant changes to the implementation of
    [time.Timer] and [time.Ticker].
    
    <!-- go.dev/issue/61542 -->
    First, `Timer`s and `Ticker`s that are no longer referred to by the program
    become eligible for garbage collection immediately, even if their
    `Stop` methods have not been called.
    Earlier versions of Go did not collect unstopped `Timer`s until after
    they had fired and never collected unstopped `Ticker`s.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 20:49:22 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  8. api/go1.20.txt

    pkg testing, method (*B) Elapsed() time.Duration #43620
    pkg time, const DateOnly = "2006-01-02" #52746
    pkg time, const DateOnly ideal-string #52746
    pkg time, const DateTime = "2006-01-02 15:04:05" #52746
    pkg time, const DateTime ideal-string #52746
    pkg time, const TimeOnly = "15:04:05" #52746
    pkg time, const TimeOnly ideal-string #52746
    pkg time, method (Time) Compare(Time) int #50770
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 21:23:32 UTC 2023
    - 602.6K bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/test_deadline.txt

    module m
    
    go 1.16
    -- deadline_test.go --
    package testing_test
    
    import (
    	"testing"
    	"time"
    )
    
    func TestNoDeadline(t *testing.T) {
    	d, ok := t.Deadline()
    	if ok || !d.IsZero() {
    		t.Fatalf("t.Deadline() = %v, %v; want 0, false", d, ok)
    	}
    }
    
    func TestDeadlineWithinMinute(t *testing.T) {
    	now := time.Now()
    	d, ok := t.Deadline()
    	if !ok || d.IsZero() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 17 13:25:29 UTC 2020
    - 1.2K bytes
    - Viewed (0)
  10. src/cmd/go/testdata/script/mod_get_hash.txt

    # fetch commit hash reachable from refs/heads/* and refs/tags/* is OK
    go list -m golang.org/x/time@8be79e1e0910c292df4e79c241bb7e8f7e725959 # on master branch
    
    # fetch other commit hash, even with a non-standard ref, is not OK
    ! go list -m golang.org/x/time@334d83c35137ac2b376c1dc3e4c7733791855a3a # refs/changes/24/41624/3
    stderr 'unknown revision'
    ! go list -m golang.org/x/time@v0.0.0-20170424233410-334d83c35137
    stderr 'unknown revision'
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 24 15:54:04 UTC 2023
    - 626 bytes
    - Viewed (0)
Back to top