Transparent Clock

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

On the latest version it kinda changes from 0 % cpu usage to 2% each second.
0% lasts 1 second, 2% lasts 1 second, 0% lasts 1 second and so on.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

That's odd because it doesn't do anything once per second. It pulses once every 60ms and draws the secondhand and crystal, and the hires timer I put on the event proc shows it's taking 1.45ms to complete the drawing and update the window. That's down from 4ms it was taking when it was still drawing all the hands every pulse. Are you certain it's this program that's using it, because my dual-core machine does the same thing all the time and the line item for Transparentclock in the process list always shows a steady 0. If the task is taking anywhere close to the same time on your system as it is on mine, 1.45ms every 60 should show deadflat 0.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Now where is that resize feature I requested...
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

It's coming...
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

...and it's here. How long did that take? Anyway, it's gonna be rather beta, but it's working ok here and it isn't affecting the cpu time (here).

Give 'er a try and let me know how it's working and if you want different sizes.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Just noticed something.
When I resize it so it's easy to see the shadow of the clock arms, when the second hand goes round, the shadow is at the wrong place ;) hehehehe
Sorry, just couldn't help myself. I seriously love this clock ;)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Yes, on the hour and minute hands I'm switching the dropshadow on the vertical but I didn't bother for the second hand because it was hardly noticeable. I'll have to add it in too if you can see it now. I must say I was pleasantly surprised to see how much quality it keeps even sized up to 512 square. Its native size is only 196.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Yeah, it's a very impressive work that clock :)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

netmaestro

If possible could you include a menu item to set the hour.
Example: the time + or - number.
That way I could set up a clock to monitor a different time
zone in reference to my local time.

Thanks again for this very cool clock.

yrreti
JCV
Enthusiast
Enthusiast
Posts: 580
Joined: Fri Jun 30, 2006 4:30 pm
Location: Philippines

Post by JCV »

It uses flat 0% cpu now. :D
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Timezones are done now. You choose an offset from the menu, just a couple of things to be aware of:

- Offset is from your time, not GMT
- You are given the option to enter a city name to show on the clock, but you can leave it blank if desired
- City name won't show against an all-white background, but I don't think I can solve this. Any color at all and it will show.

Current version is uploaded, 122k in size, timestamp 6:24am.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

oops - bad bug introduced that could cause a crash when setting timezone. Should be fixed now, please redownload. Current version timestamp is 6:50am. Sorry!

Also - systray tooltip is now updated with the city name if any, so you can tell which clock in the systray is which.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

OK - in fixing that bug I introduced another one that messes up the time sync. Fixed now, current timestamp 7:14am.
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

Wow !

I'm getting ready to go to work now, but I still had to tell you before I left.
That is a masterpeice of work.

Thank you very much
yrreti
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Thanks for the kind words, I appreciate it very much. Glad you like it.

Update: The Resize function is rewritten, it works much cleaner now.
Post Reply