×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    May 2005
    Location
    Brasov, Romania
    Posts
    431

    TTime : TInt64& Int64() problem in S60 3rd edition

    Hello!

    In S60 2nd edition I could use TTime with no problem in this manner:
    Code:
    TTime crntTime; crntTime.UniversalTime();
    TUint crntTimeLow = crntTime.Int64().Low();
    TUint crntTimeHigh = crntTime.Int64().High();
    TInt64 was a class having 2 protected members, iLow and iHigh (TUint both).

    On 3rd edition I cannot use Low() and High() because that TInt64 is just
    Code:
    typedef	Int64	TInt64;
    typedef long long Int64;
    So I cannot use Low() and High() anymore because they don't exist anymore.

    I also noticed that on 3rd edition a statement like crntTime.Int64() gives almost the same response as crntTime.Int64().Low() on 2nd edition. Is this correct?

    Is it OK to use just TTime::Int64() on 3rd edition instead of TTime::Int64().Low() on 2nd edition? Will I have the same result?

    And how will I get both "values" from a TInt64 on 3rd edition?

    Thanks in advance!

  2. #2
    Registered User
    Join Date
    Sep 2003
    Posts
    11

    Re: TTime : TInt64& Int64() problem in S60 3rd edition

    It's more OK to use the new TInt64 than the previous Low() which didn't take into account the higher part of the value at all.

    To get the low and high parts, just shift and and:

    TInt64::Low() = Int64 & 0xffffffff
    TInt64::High() = Int64 >> 32

  3. #3
    Regular Contributor
    Join Date
    May 2005
    Location
    Brasov, Romania
    Posts
    431

    Re: TTime : TInt64& Int64() problem in S60 3rd edition

    But from this I understand that older version returned as Low() the small part of the big integer that would be different now if you consider a big TInt64 value: Low() was returning value modulo maxint on 2nd edition and Int64() would return what on third edition?.

  4. #4
    Registered User
    Join Date
    Jul 2004
    Location
    Helsinki
    Posts
    9

    Re: TTime : TInt64& Int64() problem in S60 3rd edition

    #include <e32def.h>

    TTime now;
    now.HomeTime();
    TUint32 hi = I64HIGH(now.Int64());
    TUint32 lo = I64LOW(now.Int64());

    TTime now2;
    now2 = MAKE_TINT64(hi, lo);

Similar Threads

  1. OpenGL ES on S60 3rd Edition SDK Emulator
    By specjones in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2008-09-30, 10:22
  2. S60 3rd Edition and Borland BuilderX 1.5?
    By ArneH in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2008-06-21, 00:07
  3. Problem with ChoiceEements On S60
    By ritec31 in forum Mobile Java General
    Replies: 0
    Last Post: 2004-04-20, 16:20
  4. solution: S60 application icon problem
    By Nokia_Archive in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2002-06-03, 02:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×