Time.st
changeset 19848 5418481e516b
parent 18456 74744af7f90d
child 19863 513bd7237fe7
child 19922 e0d6d301a4dc
equal deleted inserted replaced
19847:ef7bf75df3ee 19848:5418481e516b
   625 !
   625 !
   626 
   626 
   627 milliseconds
   627 milliseconds
   628     "get the milliseconds part
   628     "get the milliseconds part
   629      (notice: that is NOT the total number of millis (since midnight),
   629      (notice: that is NOT the total number of millis (since midnight),
   630      but the fractional part only. Use this only for printing"
   630      but the fractional part only. Use this only for printing.
       
   631      asMilliseconds or getMilliseconds is probably what you want"
   631 
   632 
   632     ^ timeEncoding \\ 1000
   633     ^ timeEncoding \\ 1000
   633 !
   634 !
   634 
   635 
   635 minutes
   636 minutes
   636     "return the number of minutes within the hour (i.e. 0..59)"
   637     "return the number of minutes within the hour (i.e. 0..59).
       
   638      (notice: that is NOT the total number of minutes (since midnight),
       
   639      but the fractional part only. Use this only for printing."
   637 
   640 
   638     ^ (self getSeconds \\ 3600) // 60
   641     ^ (self getSeconds \\ 3600) // 60
   639 
   642 
   640     "
   643     "
   641      Time now minutes
   644      Time now minutes
   642     "
   645     "
   643 !
   646 !
   644 
   647 
   645 seconds
   648 seconds
   646     "return the number of seconds within the minute (i.e. 0..59)"
   649     "return the number of seconds within the minute (i.e. 0..59).
       
   650      (notice: that is NOT the total number of seconds (since midnight),
       
   651      but the fractional part only. Use this only for printing.
       
   652      asSeconds or getSeconds give you the nr of seconds since midnight"
   647 
   653 
   648     ^ self getSeconds \\ 60
   654     ^ self getSeconds \\ 60
   649 
   655 
   650     "
   656     "
   651      Time now seconds
   657      Time now seconds
  1075 ! !
  1081 ! !
  1076 
  1082 
  1077 !Time class methodsFor:'documentation'!
  1083 !Time class methodsFor:'documentation'!
  1078 
  1084 
  1079 version
  1085 version
  1080     ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.104 2015-06-06 12:57:19 cg Exp $'
  1086     ^ '$Header$'
  1081 !
  1087 !
  1082 
  1088 
  1083 version_CVS
  1089 version_CVS
  1084     ^ '$Header: /cvs/stx/stx/libbasic/Time.st,v 1.104 2015-06-06 12:57:19 cg Exp $'
  1090     ^ '$Header$'
  1085 ! !
  1091 ! !
  1086 
  1092