process.go 434 B

123456789101112131415161718192021222324
  1. package main
  2. type Process struct {
  3. name string
  4. arriveTime int
  5. serveTime int
  6. beginTime int
  7. finishTime int
  8. roundTime int
  9. aveRoundTime float64
  10. clock float64
  11. isFinished bool
  12. priority int
  13. }
  14. func newProcess(name string, arriveTime int, serveTime int) *Process {
  15. return &Process{
  16. name: name,
  17. arriveTime: arriveTime,
  18. serveTime: serveTime,
  19. clock: 0,
  20. isFinished: false,
  21. }
  22. }