Hi,
Is there a possibility to register some method of an user-defined
object to keep it notified about the date changed event? I wonder if
there is a non os-related solution.
My object will process some request and they should be grouped by the
date. I can get the current date for each request and activate a
proper group, but it would be more effectively if the date was updated
once per 24h not for every request. Additionaly if the group is older
than some period it should be removed.
Thanks in advance,
twister
|
|
0
|
|
|
|
Reply
|
dariusz.boczkowski (13)
|
11/16/2009 4:27:23 PM |
|
twister wrote:
> Is there a possibility to register some method of an user-defined
> object to keep it notified about the date changed event? I wonder if
> there is a non os-related solution.
There can be no "non os-related solution" since calendar, time, date are
all concepts that are platform-specific, and aren't guaranteed to exist.
> [..]
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
|
|
0
|
|
|
|
Reply
|
Victor
|
11/16/2009 4:36:59 PM
|
|
On 16 Lis, 17:36, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
> twister wrote:
> > Is there a possibility to register some method of an user-defined
> > object to keep it notified about the date changed event? I wonder if
> > there is a non os-related solution.
>
> There can be no "non os-related solution" since calendar, time, date are
> all concepts that are platform-specific, and aren't guaranteed to exist.
>
> > [..]
>
> V
> --
> Please remove capital 'A's when replying by e-mail
> I do not respond to top-posted replies, please don't ask
But if the linux/unix system is considered where it could be
registered?
Thanks,
twister
|
|
0
|
|
|
|
Reply
|
twister
|
11/16/2009 4:48:30 PM
|
|
On Nov 16, 8:48=A0am, twister <dariusz.boczkow...@gmail.com> wrote:
> On 16 Lis, 17:36, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
>
> > twister wrote:
> > > Is there a possibility to register some method of an user-defined
> > > object to keep it notified about the date changed event? I wonder if
> > > there is a non os-related solution.
>
> > There can be no "non os-related solution" since calendar, time, date ar=
e
> > all concepts that are platform-specific, and aren't guaranteed to exist=
..
>
> > > [..]
>
> > V
> > --
> > Please remove capital 'A's when replying by e-mail
> > I do not respond to top-posted replies, please don't ask
>
> But if the linux/unix system is considered where it could be
> registered?
>
Ask on comp.unix.programmer. Any such mechanism would be platform
specific, and not topical to comp.lang.c++.
|
|
0
|
|
|
|
Reply
|
red
|
11/16/2009 5:25:11 PM
|
|
On Mon, 2009-11-16, twister wrote:
> Hi,
> Is there a possibility to register some method of an user-defined
> object to keep it notified about the date changed event? I wonder if
> there is a non os-related solution.
> My object will process some request and they should be grouped by the
> date. I can get the current date for each request and activate a
> proper group, but it would be more effectively if the date was updated
^^^^^^^^^^^
Do you mean "more efficient" or "more elegant" or something else?
> once per 24h not for every request. Additionaly if the group is older
> than some period it should be removed.
You mentioned Unix later on. There is no such signal there -- and I
think there isn't in any modern OS. It's unimportant to almost all
software, and different processes can be in different timezones anyway.
Plus, I doubt it is wise to add asynchronous events to an application
which doesn't otherwise need it.
If you know that finding the date from a time_t will take too
much time (thousands of requests per second?) then you can write
a class that caches such knowledge. E.g. if time_t(N) is 08:00
today, then we're still at the same date at time_t(N+10), or
time_t(N+10000). Just watch out for DST changes -- check the real
date now and then. Once a minute, maybe.
/Jorgen
--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
|
|
0
|
|
|
|
Reply
|
Jorgen
|
11/18/2009 6:44:23 PM
|
|
On 18 Nov., 19:44, Jorgen Grahn <grahn+n...@snipabacken.se> wrote:
> On Mon, 2009-11-16, twister wrote:
> > Hi,
> > Is there a possibility to register some method of an user-defined
> > object to keep it notified about the date changed event? I wonder if
> > there is a non os-related solution.
> > My object will process some request and they should be grouped by the
> > date. I can get the current date for each request and activate a
> > proper group, but it would be more effectively if the date was updated
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0^^^^^^^^^^^
> Do you mean "more efficient" or "more elegant" or something else?
>
> > once per 24h not for every request. Additionaly if the group is older
> > than some period it should be removed.
>
> You mentioned Unix later on. =A0There is no such signal there -- and I
> think there isn't in any modern OS. It's unimportant to almost all
> software, and different processes can be in different timezones anyway.
On Unix you could send a signal that would by default be ignored.
Also, on Windows every process with a message queue will get a message
whenever there is a time "change" and in many other cases.
And there is software that cares. As an example all types of software
that is supposed to react on certain times of the day, and I do not
believe software of that type is so uncommon. Several types of
software I have developed has had such time dependencies, although
admittedly some of that has been running in the UTC timezone.
>
> Plus, I doubt it is wise to add asynchronous events to an application
> which doesn't otherwise need it.
Why?
/Peter
|
|
0
|
|
|
|
Reply
|
peter
|
11/18/2009 8:52:20 PM
|
|
|
5 Replies
112 Views
(page loaded in 0.153 seconds)
Similiar Articles: Can I interrupt a running GUI callback? - comp.soft-sys.matlab ...I believe timer functions have changed how they operate. I ... Date: 14 Dec, 2010 09 ... interrupt, have a callback open a GUI window that asks what should be done and ... bBrowser Edit problem - comp.lang.clipper.visual-objects ...... Refresh() ENDIF RETURN nil Then the date and cusomer field are entered in the callback method as ... lines, select any particular line and right align it or change ... Change border colors in Word tables - comp.sys.mac.appsWhat I'd like to do is change the border colors on the ... Date of Last table update - comp.databases.mysql mark ... uitable - comp.soft-sys.matlab Update Data using callback ... Stop running program without exiting current GUI - comp.soft-sys ...... do following 1) set the 'userdata' value '1' in callback ... your GUI and whenever you press the push button, change ... Date: 14 Dec, 2010 09:20:05. Message: 1 of 6 Masked block, Simulink - force initialization commands on resize ...... the block and thus the displayed string does not change. ... any hints, > Josar Hi, The MoveFcn block callback ... Date: 28 Apr, 2010 13:33:04. Message: 1 of 3 How can i define global variable in matlab gui? - comp.soft-sys ...I want to create a gui in which i can change the values ... the user has to be stored in another variable ... callback ... Date: 30 Jul, 2010 06:23:07. Message: 1 of 2 Difference beetwen awk and gawk? - comp.lang.awkDate differences in nawk - comp.lang.awk Difference ... to awk, I wrote a simple script using gawk, then change ... Difference between Call and Callback ??? - comp.lang.asm ... 'Deferred' functions? - comp.lang.javascriptThis would invoke the callback function once the current ... -- Danny Goodman's books are out of date and teach ... receives focus, it does not initiate a | change of ... Read Excel with Object Rexx - comp.lang.rexxJerry, My email was out of date on my last post - this ... say 'The value of cell' row||col 'will be changed to ... function to load mat files and then writing a callback ... ... programatically select cells in uitable - comp.soft-sys.matlab ...Update Data using callback of Uitable - comp.soft-sys ... for only one column in uitable - comp ..... need change ... Date: 4 Mar, 2008 14:51:04 ... Is there any way to ... Registering a Callback - Microsoft Corporation: Software ...If the callback is invoked for a state variable change, then the function is passed two additional ... Send comments about this topic to Microsoft. Build date: 5/5 ... PasswordChangeNotify callback function - Microsoft Corporation ...PasswordChangeNotify callback function ... The account name of the user whose password changed. ... comments about this topic to Microsoft. Build date ... 7/21/2012 7:48:10 PM
|