• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I obtain a TimeStamp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I obtain a TimeStamp


  • Subject: Re: How do I obtain a TimeStamp
  • From: j o a r <email@hidden>
  • Date: Thu, 31 Mar 2005 00:37:56 +0200


On 2005-03-31, at 00.29, John Draper wrote:

Throughout my program,  I'm going to want to put "time stamps".
How do I do this?

I'm not concerned about the time units at this point,  I just need
to know how to do this..

You're probably looking for NSDate. For example:

NSDate *aDate = [NSDate date];

In looking at the Docs,  I see that NSEvent has a "timestamp"
method,  but how do I get my application's NSEvent reference
to use it?

ie:

 time_stamp = [myEvent timestamp];

But how do I get "myEvent" to reference my current event object?

How about:

NSTimeInterval aTimeInterval = [[NSApp currentEvent] timestamp];

...but I'm not sure that you're really looking for "time stamps" from events. I would bet that you should have a look at the NSDate class.

j o a r

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How do I obtain a TimeStamp (From: John Draper <email@hidden>)

  • Prev by Date: Re: NSCopying is manual labor
  • Next by Date: Re: How do I obtain a TimeStamp
  • Previous by thread: How do I obtain a TimeStamp
  • Next by thread: Re: How do I obtain a TimeStamp
  • Index(es):
    • Date
    • Thread