Sub Process_Globals
Private fx As JFX
Private MainForm As Form
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
Wait For (Job_Current_Time) Complete (Success As Boolean)
Log("Job_Current_Time = " & Success)
End Sub
Sub Job_Current_Time As ResumableSub
Log("Http.Get_Current_Time")
Dim job As HttpJob : job.Initialize("", Me)
job.Download("http://worldtimeapi.org/api/timezone/America/Los_Angeles")
Wait For (job) JobDone(job As HttpJob)
If job.Success Then
Dim jobstring As String = job.GetString
Dim JSON As JSONParser : JSON.Initialize(jobstring)
Dim m As Map = JSON.NextObject
Log(m)
Else
LogError(job.JobName & " " & job.ErrorMessage)
End If
job.Release
Return job.Success
End Sub