Dim heuredebut As DateTime = DateTime.Now System.Threading.Thread.Sleep(24000) ' 24000 -> 24 secondes Dim heurefin As DateTime = DateTime.Now Dim diff As String = returnTimeDiff(heuredebut, heurefin)
Dim chrono As New Stopwatch() chrono.Start() System.Threading.Thread.Sleep(24000) ' 24000 -> 24 secondes chrono.Stop() Dim diff As TimeSpan = chrono.Elapsed
Dim duree As TimeSpan = TimeSpan.FromSeconds(24) Dim dureeTotale As Double = duree.TotalSeconds * 500 Dim DateFin As DateTime = DateTime.Now.AddSeconds(dureeTotale)
Dim duree As TimeSpan = TimeSpan.FromSeconds(24 * 500) Dim DateFin As DateTime = DateTime.Now + duree
<DllImport("kernel32.dll")> Private Shared Function GetTickCount() As UInteger End Function Private function Tempstraitement as uinteger Dim debutrecherche As UInteger debuttraiitement = GetTickCount() Traitementdunfichier ' sous-programme traitement d'un fichier return GetTickCount() - debutrecherche end Function
If countwordfile = 0 ThenJe n'ai pas besoin d'une grande précision pour évaluer la fin de création des fichiers word.
Dim stopWatch As New Stopwatch()
stopWatch.Start()
System.Threading.Thread.Sleep(12000) ' 12000 -> 12 secondes
stopWatch.Stop()
Dim ts As TimeSpan = stopWatch.Elapsed
Dim elapse As Double = ts.TotalSeconds * fileword.Count
Dim duree As TimeSpan = TimeSpan.FromSeconds(elapse)
Dim heurefin As String = DateTime.Now.AddSeconds(elapse)
UpdateLabelProgressBarElapse("Estimation durée " & Environment.NewLine & New String(" "c, 8) & duree.ToString.Substring(0, 8))
UpdateLabelProgressBarTimeEnd("Estimation heure de fin" & Environment.NewLine & New String(" "c, 10) & heurefin.ToString.Substring(11, 8))
End If
If countwordfile = 0 Then
Dim stopWatch As New Stopwatch()
Dim heuredebut As DateTime = DateTime.Now
stopWatch.Start()
System.Threading.Thread.Sleep(12000) ' 12000 -> 12 secondes
stopWatch.Stop()
Dim ts As TimeSpan = stopWatch.Elapsed
Dim elapse As Double = ts.TotalSeconds * fileword.Count
Dim duree As TimeSpan = TimeSpan.FromSeconds(elapse)
Dim heurefin As String = heuredebut.AddSeconds(elapse)
UpdateLabelProgressBarElapse("Estimation durée " & duree.ToString.Substring(0, 8))
UpdateLabelProgressBarTimeEnd("Estimation heure de fin" & heurefin.ToString.Substring(11, 8))
End If
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question