private function getTimeFormat(second:uint):String { var hh:Number = (second/3600)>>0;//把秒除得时间 var mm:Number = (second%3600)/60>>0;//把余数用于除得分钟 var ss:Number = (second%3600)%60>>0;//最后的余数直接就是秒钟 var tss:String = ss<10 ? "0"+ss: ss+""; var tmm:String = mm<10 ?"0"+mm:mm+""; var thh:String = hh<10 ?"0"+hh:hh+""; return thh+":"+tmm+":"+tss; }
时间: 2024-11-05 19:45:12