B4J Question I cann't use Sleep(1)

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi
Why i cann't use sleep in B4j 5.5 ? IDE always give me following message when i add Sleep(1).

d934965976a1b95988707d9787443730.png
 

jinyistudio

Well-Known Member
Licensed User
Longtime User
1. Why aren't you using Sleep(3000)?
I am waiting writed data to PLC.

2. Why aren't you using jServer to build a real http server?
I have use server as following
B4X:
Sub Process_Globals
    Private srvr As Server
    Private timer1 As Timer
End Sub

Sub AppStart (Args() As String)
    plc.Initialize
    '
    srvr.Initialize("srvr")
    srvr.Port = 8010
    srvr.AddHandler("/put", "PutHandler", False)
    srvr.AddHandler("/get", "GetHandler", False)
    srvr.Start
    Log($"Server started by ${srvr.Port}"$)
   
    timer1.Initialize("timer1",250)
    timer1.Enabled=True
    StartMessageLoop
End Sub
 
Upvote 0

jinyistudio

Well-Known Member
Licensed User
Longtime User
I update to the lastest version. It is OK :)
 
Upvote 0
Top