F FrankBerra Active Member Licensed User Longtime User Oct 31, 2015 #1 Is there any suggestion how to log the execution time of a loop? For example I use the following code B4X: time1 = DateTime.now Do while ... Loop time2 = DateTime.now result= time2 - time1 toastmessageshow (result, false) ...but it displays always 0 milliseconds even if the app freezes for a couple of seconds
Is there any suggestion how to log the execution time of a loop? For example I use the following code B4X: time1 = DateTime.now Do while ... Loop time2 = DateTime.now result= time2 - time1 toastmessageshow (result, false) ...but it displays always 0 milliseconds even if the app freezes for a couple of seconds
klaus Expert Licensed User Longtime User Oct 31, 2015 #2 Try with Log(result) instead of toastmessageshow (result, false). Upvote 0
R Roycefer Well-Known Member Licensed User Longtime User Oct 31, 2015 #3 ToastMessageShow() should work. What variable type is time1, time2 and result? They should all be Long. Anything else and you'll get anomalous results. Upvote 0
ToastMessageShow() should work. What variable type is time1, time2 and result? They should all be Long. Anything else and you'll get anomalous results.
F FrankBerra Active Member Licensed User Longtime User Nov 6, 2015 #4 Setting variables as Long everything worked perfectly! Thank you Roycefer Upvote 0