Subversion Repositories DevTools

Rev

Rev 6770 | Rev 6827 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6770 Rev 6786
Line 2141... Line 2141...
2141
       NiceCLng = CLng(val)
2141
       NiceCLng = CLng(val)
2142
   Else
2142
   Else
2143
       NiceCLng = def
2143
       NiceCLng = def
2144
   End If
2144
   End If
2145
End Function
2145
End Function
-
 
2146
 
-
 
2147
'--------------------------------------------------------------------------------------------------------------------------
-
 
2148
' Convert a duration(seconds) into days,hours and seconds. eg 10d 3h 13m 15s
-
 
2149
Function NiceDuration(duration)
-
 
2150
    NiceDuration = ""
-
 
2151
    Dim joiner : joiner = ""
-
 
2152
    Dim unit
-
 
2153
    If duration > (60 * 60 * 24) Then
-
 
2154
        unit = Int(duration / (60 * 60 * 24))
-
 
2155
        duration = duration MOD (60 * 60 * 24) 
-
 
2156
        NiceDuration = NiceDuration & joiner & unit & "d"
-
 
2157
        joiner = " "
-
 
2158
    End If
-
 
2159
 
-
 
2160
    If duration > (60 * 60) Then
-
 
2161
        unit = Int(duration / (60 * 60))
-
 
2162
        duration = duration MOD (60 * 60) 
-
 
2163
        NiceDuration = NiceDuration & joiner & unit & "h"
-
 
2164
        joiner = " "
-
 
2165
    End If
-
 
2166
 
-
 
2167
        If duration > (60) Then
-
 
2168
        unit = Int(duration / (60))
-
 
2169
        duration = duration MOD (60) 
-
 
2170
        NiceDuration = NiceDuration & joiner & unit & "m"
-
 
2171
        joiner = " "
-
 
2172
    End If
-
 
2173
 
-
 
2174
    NiceDuration = NiceDuration & joiner & duration & "s"
-
 
2175
End Function
-
 
2176
 
2146
'--------------------------------------------------------------------------------------------------------------------------
2177
'--------------------------------------------------------------------------------------------------------------------------
2147
'   Test if package can be added to a release
2178
'   Test if package can be added to a release
2148
'       Really tests if a a package of this packages alias can be
2179
'       Really tests if a a package of this packages alias can be
2149
'       manipulated in this release
2180
'       manipulated in this release
2150
'   True: Package alias can be added/replaced in release
2181
'   True: Package alias can be added/replaced in release