Contar el tiempo de un proceso con ASP clasico
Código ASP clásico
- Por Programador ASP clásico /
- 07/08/2012 @ 13:56:04 /
- 1006 visitas
Esta función permite calcular el tiempo de un proceso.
Poner en el inicio de la página:
<%
Dim Xtimer
Xtimer = Timer
%>
Poner al final d e la página:
<%
Response.Write P13_Timer(timer-timex)
%>
y esta es la función del timer:
<%
'***P13 Timer v1.3 by Ferruh Mavituna
'//NFO//
' Make clock tiemr format
'//ARGUMENTS//
' timex : Time as Second
'//RETURN//
'Some String Like 00:15
'//SAMPLE//
' Response.Write P13_Timer(timer)
Function P13_Timer(timex)
Dim mn, sc, mntxt, sctxt
If isnumeric(timex) Then
'// Format Minute
mn = Round(timex/60,0)
if mn < 0 Then mn = 0
if mn < 10 Then mntxt = "0"
mntxt = mntxt & mn
'// Format Second
sc = Round(timex Mod 60,0)
if sc < 0 Then sc = 0
if sc < 10 Then sctxt = "0"
sctxt = sctxt & sc
'// Final
P13_Timer = mntxt & ":" & sctxt
Else
P13_Timer = "Error value is not numeric !"
End If
End function
%><%
Response.Write P13_Timer(timer-timex)
%>
tags: timers, timer visual, asp lenguaje, asp servidor, contador temporizador, intervaal timer, contador timer, timer control, control timer, contador en visual, temporizadores timers