oo7
Newish
My name is Bond.... James Bond
Posts: 15
|
Time
Oct 10, 2007 12:42:36 GMT -5
Post by oo7 on Oct 10, 2007 12:42:36 GMT -5
I've got a problem. i'm making a simple clock but i can't find a function who returns the current system-time. is there a function for this?? I've downloaded Codeblocks to make a easy dll, but I dont understand how to make it. could somebody explain how to make this simple dll??
|
|
|
Time
Oct 10, 2007 14:07:46 GMT -5
Post by James :) (aka Madcow) on Oct 10, 2007 14:07:46 GMT -5
you need to make a dll to return the time and sorry i can't go into how to make dll right now but all i can say is when you compile your plugin goto the place where your code is stored ten in the same plae their should be a bin folder with a dll file in it. that dll should have your code in it.(the dll will have the same name as the file that has your code.
|
|
|
Time
Oct 11, 2007 4:04:18 GMT -5
Post by matthew on Oct 11, 2007 4:04:18 GMT -5
I've got a problem. i'm making a simple clock but i can't find a function who returns the current system-time. is there a function for this?? I've downloaded Codeblocks to make a easy dll, but I dont understand how to make it. could somebody explain how to make this simple dll?? Have you downloaded the Plugin SDK from the download page on the Website? You can find more info about dlls in Basic4GL on this page of the forum. I can't help you much with writing dlls using CodeBlocks as I'm using Dev-C++ and creating dlls in that is a little different. But I have written a simple C program that will print the time in a command prompt, you can get it here. Using the source code for the C program it shouldn't be that difficult for you to create a dll for Basic4GL that does a similar function.
|
|
oo7
Newish
My name is Bond.... James Bond
Posts: 15
|
Time
Oct 11, 2007 13:14:29 GMT -5
Post by oo7 on Oct 11, 2007 13:14:29 GMT -5
Thanks. I think I can make this function now
|
|
|
Time
Oct 11, 2007 16:33:01 GMT -5
Post by Tom Mulgrew on Oct 11, 2007 16:33:01 GMT -5
|
|
|
Time
Oct 12, 2007 6:42:08 GMT -5
Post by Nicky Peter Hollyoake on Oct 12, 2007 6:42:08 GMT -5
Nice. Tom, you should set that in B4GL, instead of a DLL, alot of people always asking for it. BTW are they anyway to put the time in an a variable? Like ...
Dim Time#(2)
Do Time# = Time() Print Time#(0) + ":" + Time#(1) + ":" + Time#(2) Loop
[glow=red,2,300]Nicky[/glow]
|
|
|
Time
Oct 12, 2007 20:07:12 GMT -5
Post by Tom Mulgrew on Oct 12, 2007 20:07:12 GMT -5
BTW are they anyway to put the time in an a variable? Like ... Yep. dim TimeOfDay t t = Time()
printr "Hours: "; t.hour printr "Minutes: "; t.min printr "Seconds: "; t.sec printr "Milliseconds: "; t.ms if t.am = 1 then printr "AM" else printr "PM" endif
|
|
|
Time
Oct 13, 2007 11:46:54 GMT -5
Post by b0ib0t on Oct 13, 2007 11:46:54 GMT -5
Something like this would be really good for optimization of highly complex programs. One could make a sort of scaffolding that allows you to count the amount of time certain pieces of code take to execute. This would allow you to 1, know if it needs to be optimized, and 2, see just how much gains you get from your optimizations.
Thanks for this Tom!
|
|
oo7
Newish
My name is Bond.... James Bond
Posts: 15
|
Time
Oct 27, 2007 8:46:32 GMT -5
Post by oo7 on Oct 27, 2007 8:46:32 GMT -5
Thanks
|
|
|
Time
Oct 27, 2007 10:30:36 GMT -5
Post by James :) (aka Madcow) on Oct 27, 2007 10:30:36 GMT -5
plugin needs the date
|
|