最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

如何計算下載一個文件需要多長時間?

 更新時間:2006年11月16日 00:00:00   作者:  

<%
Function DownloadTime(intFileSize, strModemType)
Dim TimeInSeconds, ModemSpeed, strDownloadTime, AppendString
Dim intYears, intWeeks, intDays
Dim intHours, intMinutes, intSeconds
intYears = 0
intWeeks = 0
intDays = 0
intHours = 0
intMinutes = 0
intSeconds = 0
strDownloadTime = ""
Select Case strModemType
Case "Cable"
  ModemSpeed = 400000
Case "56kbps"
  ModemSpeed = 7000
Case "33.6kbps"
  ModemSpeed = 4200
Case "28.8kbps"
  ModemSpeed = 3600
End Select
TimeInSeconds = int(intFileSize / ModemSpeed)
'
準(zhǔn)確地說,1年=365.25.
If (Int(TimeInSeconds / 31471200) <> 0) Then intYears = Int(TimeInSeconds / 31449600)
If ((Int(TimeInSeconds / 604800) Mod 52) <> 0) Then intWeeks = Int(TimeInSeconds / 604800) Mod 52
If ((Int(TimeInSeconds / 86400) Mod 7) <> 0) Then intDays = Int(TimeInSeconds / 86400) Mod 7
If TimeInSeconds >= 3600 Then intHours = Int(TimeInSeconds / 3600) Mod 24
If TimeInSeconds >= 60 Then intMinutes = Int(TimeInSeconds / 60) Mod 60
If TimeInSeconds >= 0 Then intSeconds = Int(TimeInSeconds) Mod 60
If intYears <> 0 Then
  strDownloadTime = strDownloadTime & intYears & "
" & AppendString & ", "
End If
If intWeeks <> 0 Then
  strDownloadTime = strDownloadTime & intWeeks & "
" & AppendString & ", "
End If
If intDays <> 0 Then
  strDownloadTime = strDownloadTime & intDays & "
" & AppendString & ", "
End If
If intHours <> 0 Then
  strDownloadTime = strDownloadTime & intHours & "
小時" & AppendString & ", "
End If
If intMinutes <> 0 Then
  strDownloadTime = strDownloadTime & intMinutes & "
" & AppendString
End If
If ((intYears = 0) And (intWeeks = 0) And (intDays = 0) And (intHours = 0)) Then
  If intMinutes > 0 Then
  strDownloadTime = strDownloadTime  & ", " & intSeconds & "
" & AppendString
  Else
  strDownloadTime = strDownloadTime & intSeconds & "
" & AppendString
  End If
End If
DownloadTime = strDownloadTime
End Function
%>
<html>
<body>
撼雪噴云提示:您下載這個文件一共花費了<%=DownloadTime(123456,Cable)%>.
</body></html>

[1]

相關(guān)文章

最新評論

曲沃县| 柳江县| 安塞县| 杭锦旗| 腾冲县| 玉山县| 宁远县| 延庆县| 手游| 榕江县| 湾仔区| 汾西县| 乌苏市| 镇赉县| 天峻县| 恩施市| 通山县| 科技| 苍溪县| 赣榆县| 如皋市| 乌苏市| 长丰县| 双鸭山市| 鄯善县| 沾化县| 沁水县| 周宁县| 山阳县| 阳东县| 嘉峪关市| 漳浦县| 沈丘县| 天津市| 安平县| 陆河县| 宁远县| 本溪市| 黄平县| 阿巴嘎旗| 靖西县|