摘要: private string GetCurTimeStamp(){ TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0); return Convert.ToInt64(ts.TotalSeconds).ToString();} 阅读全文
posted @ 2013-05-06 10:46 Marble 阅读(188) 评论(0) 推荐(0) 编辑
摘要: private string FormatTime(int time){ int hour = 0, min = 0, sec = 0; hour = time/60/60; min = (time%(60*60))/60; sec = (time%(60*60))%60%60; return string.Format("{0:00}:{1:00}:{2:00}", hour, min, sec);} 阅读全文
posted @ 2013-05-06 10:45 Marble 阅读(379) 评论(0) 推荐(0) 编辑