Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/ctxswitch/goroutine.go

    r50cfa99 rbf71cfd  
    22
    33import (
    4         "fmt"
    5         "time"
    6         "os"
    7         "strconv"
    8         "runtime"
     4    "fmt"
     5    "runtime"
     6    "time"
    97)
    108
     
    3028
    3129func main() {
    32         var times int = 10000000
    33         if len( os.Args ) > 2 { os.Exit( 1 ) }
    34         if len( os.Args ) == 2 { times, _ = strconv.Atoi(os.Args[1]) }
    35         go ContextSwitch( times )               // context switch
     30        const NoOfTimes = 10000000
     31        go ContextSwitch( NoOfTimes )           // context switch
    3632        <- shake
    3733}
    38 
    39 // Local Variables: //
    40 // tab-width: 4 //
    41 // End: //
Note: See TracChangeset for help on using the changeset viewer.