Time routines

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
dangerous
Posts: 748
Joined: 08 Mar 2005 16:06
Location: Nottinghamshire, UK

Time routines

#1 Post by dangerous » 05 Sep 2022 12:16

Hi, Silly question.

Code: Select all

dim GTDV as string[18]
       GTDV = DoGetDateTime()  

Code: Select all

dim GTDV as string[18]
       GTDV = GetDateTime()
Can anyone tell me what the diference is between the two functions above? I want to use one of them to time stamp the eeprom in a PIC18F45K22, but cannot see any difference in performance whichever I use.
Example:

Code: Select all

str = GetDateTime()
Both require "str" to be defined as an array and the return is 18 bytes of ASCII code as DD/MM/YYYY HH:MM:SS
There is no change to memory useage (RAM or ROM).
The only obvious diference is that the complier underlines DoGetDateTime() with a wiggly red line which usually means it will not compile, but it does in this usage.
Is one to be preferred over the other?

Confused again!

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Time routines

#2 Post by filip » 07 Sep 2022 09:16

Hi,

Both routines do the same thing, you can use either of them.

Regards,
Filip.

dangerous
Posts: 748
Joined: 08 Mar 2005 16:06
Location: Nottinghamshire, UK

Re: Time routines

#3 Post by dangerous » 07 Sep 2022 11:26

Thanks Filip.

Post Reply

Return to “mikroBasic PRO for PIC General”