Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(16 Kb)
Download
Updated: 11-27-12 06:00 PM
Pictures
File Info
Compatibility:
Landfall (5.1)
Mists of Pandaria (5.0.4)
Updated:11-27-12 06:00 PM
Created:10-31-10 03:15 PM
Downloads:3,522
Favorites:67
MD5:
shClock
Version: v2.3
by: shUI [More]
shClock
An extremely light-weight data broker addons that monitors and displays time/date related information

Why use this addon instead of some of the other famous system monitors? Simple: elegance, ease of use, and efficiency. Other addons similar to shClock are extremely "busy" and highly inefficient when it comes to coding.

IMPORTANT: You must have a data broker display addon in order to enable this addon. I recommend Docking Station or you can find a list of other LDB display addons here. Changing the fonts of the tooltips is handled via a tooltip addon. I highly recommend using TipTac.

This addon displays and has the following options:

  • Server Time
  • Local Time
  • UTC Time
  • Date
  • Locale
  • Shows pending calendar invites in tooltip and broker (updated in real time)
  • Option: for showing 24-hour or 12-hour formatted time
I was completely baffled when I saw some coding of other author's data broker addons that displayed this information. My goals in creating this addon are:
  • Make the code as efficient as possible and to maintain < 10kb of memory usage AND < 0.7 cpu_cycles/second w/o loss in funtionality.
  • Compared to other LDB clock addons, MUCH more efficient (memory and cpu) with same basic functionalities
  • Be visually appealing and easy to read
  • Be updated in real time via the tooltip AND data broker text
  • Display relevant data that is important (NO FLUFF or Techno Babble)

Bug Reports and/or Requests:
All bug reports, requests (with this addon or another), errors, suggestions, and problems will be handled via the forum-comments page.

If you liked this mod, please check out my other addons:
shPerformance: Data Broker memory/latency/fps usage display utility
shNameplates: Lightweight, simple, and sexy nameplates

Click here to lend your support!
v2.3
- TOC bump
-----------------
v2.2
- Fixed another stupid logic mistake: find("0",s) to tonumber(s) < 10
------------------
v2.1
- Fixed and optimized logic mistake I made when converting to standard time from military
------------------
v2.0
- Complete overhaul of code and made it much more efficient using LUA based functions
- Optimized CPU usage to be between 0.36 and 0.69 cpu_cycles/second
- Optimized MEM usage to be less than 10kb
- TOC bump to MoP
- NO loss in functionality :)
------------------
v1.3
- rewrote lots of code for formatting the time
- REMOVED option to display seconds (causing a memory leak and I can't figure out why)
- ADDED option to display pending calendar invites in broker display and tooltip
- optimized all code
--------------------
v1.2
- optimized onupdate handler
- added option to show seconds or not show seconds in data broker
- added option for left clicking (time manager) and right clicking (calendar)
---------------------
v1.1
- fixed the issue with not formatting the time correctly
- added 24 hour support (check lua file to turn it on and off)
- optimized some code
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Author
Date
v2.2
16kB
shUI
10-23-12 08:17 PM
v2.1
16kB
shUI
10-22-12 06:34 PM
v2.0
16kB
shUI
10-21-12 12:48 PM


Post A Reply Comment Options
Unread 01-17-11, 10:21 PM  
creepy_inc
A Deviate Faerie Dragon
 
creepy_inc's Avatar

Forum posts: 10
File comments: 243
Uploads: 0
Any chance you can make it hide invites once they're accepted?
creepy_inc is offline Report comment to moderator  
Reply With Quote
Unread 11-04-10, 04:17 PM  
shUI
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 321
Uploads: 5
Originally posted by acidic-e-
Just put in the new version and it is only showing the 24 hour time clock you can open the time manager and set it to 24 hour time but on a tool bar (bazooka) it only shows 24 hour time not 12 hour time.
At this time, you have to go into shClock.lua and change the boolean value for twentyFour. You'll see in the comments at the top of the code. This will do what you ask it to.
__________________
shPerformance: Data Broker memory/latency/fps usage display utility
shNameplates: Lightweight, simple, and sexy nameplates
shClock: Lightweight and simple data broker clock
shUI is offline Report comment to moderator  
Reply With Quote
Unread 11-04-10, 02:44 PM  
acidic-e-
A Kobold Labourer

Forum posts: 0
File comments: 23
Uploads: 0
Just put in the new version and it is only showing the 24 hour time clock you can open the time manager and set it to 24 hour time but on a tool bar (bazooka) it only shows 24 hour time not 12 hour time.
acidic-e- is offline Report comment to moderator  
Reply With Quote
Unread 11-04-10, 01:46 PM  
shUI
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 321
Uploads: 5
Originally posted by Tonyleila
i just said it because of this quote
You also have to remember, other authors don't have their tooltips update in realtime and show seconds and formatted like I do. But I updated the addon broker, so it should be around 7 kb now.
__________________
shPerformance: Data Broker memory/latency/fps usage display utility
shNameplates: Lightweight, simple, and sexy nameplates
shClock: Lightweight and simple data broker clock
shUI is offline Report comment to moderator  
Reply With Quote
Unread 11-04-10, 01:27 PM  
Tonyleila
A Rage Talon Dragon Guard
 
Tonyleila's Avatar
AddOn Author - Click to view AddOns

Forum posts: 347
File comments: 1349
Uploads: 33
Originally posted by shUI
I was completely baffled when I saw some coding of other author's data broker addons that displayed this information.
i just said it because of this quote
Last edited by Tonyleila : 11-04-10 at 01:28 PM.
Tonyleila is offline Report comment to moderator  
Reply With Quote
Unread 11-04-10, 09:38 AM  
shUI
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 321
Uploads: 5
Originally posted by creepy_inc
yeah over 9kb!

On a serious note do you really care that much if something is 3kb or 12kb or 15kb? I hope your computer can handle those tiny numbers
I actually updated the addon last night after the first update, you shouldn't have the memory leak anymore and it hovers around 9kb. I am going to look at some other code to see where they are saving memory, but 9kb isn't that bad imo.
__________________
shPerformance: Data Broker memory/latency/fps usage display utility
shNameplates: Lightweight, simple, and sexy nameplates
shClock: Lightweight and simple data broker clock
shUI is offline Report comment to moderator  
Reply With Quote
Unread 11-04-10, 06:34 AM  
creepy_inc
A Deviate Faerie Dragon
 
creepy_inc's Avatar

Forum posts: 10
File comments: 243
Uploads: 0
Originally posted by Tonyleila
Hmm 15kb is big isen't it? for example TiBUI_LDBClock has 3kb ok it doesn't show seconds but the time manager is includet and it shows you when you have Calendar invites.
yeah over 9kb!

On a serious note do you really care that much if something is 3kb or 12kb or 15kb? I hope your computer can handle those tiny numbers
creepy_inc is offline Report comment to moderator  
Reply With Quote
Unread 11-04-10, 05:20 AM  
Tonyleila
A Rage Talon Dragon Guard
 
Tonyleila's Avatar
AddOn Author - Click to view AddOns

Forum posts: 347
File comments: 1349
Uploads: 33
Hmm 15kb is big isen't it? for example TiBUI_LDBClock has 3kb ok it doesn't show seconds but the time manager is includet and it shows you when you have Calendar invites.
Tonyleila is offline Report comment to moderator  
Reply With Quote
Unread 11-02-10, 03:10 PM  
shUI
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 321
Uploads: 5
Originally posted by X-buZZ
Clicking on the broker currently opens the calendar. It would be great to have an option to open the time manager instead (stopwatch, alert etc.)
Oh really, I like that idea. Look for it in the next update.
__________________
shPerformance: Data Broker memory/latency/fps usage display utility
shNameplates: Lightweight, simple, and sexy nameplates
shClock: Lightweight and simple data broker clock
shUI is offline Report comment to moderator  
Reply With Quote
Unread 11-02-10, 10:42 AM  
X-buZZ
A Kobold Labourer

Forum posts: 1
File comments: 56
Uploads: 0
Clicking on the broker currently opens the calendar. It would be great to have an option to open the time manager instead (stopwatch, alert etc.)
X-buZZ is offline Report comment to moderator  
Reply With Quote
Unread 11-02-10, 08:09 AM  
shUI
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 321
Uploads: 5
Absolutely, one great thing about using LUA, is the fact that you can call on functions that deal directly with your personal computer (e.g. getting the time). If you go through the code you can delete "date("%S")" or just remove them from the lines. I will add this option in the future.
__________________
shPerformance: Data Broker memory/latency/fps usage display utility
shNameplates: Lightweight, simple, and sexy nameplates
shClock: Lightweight and simple data broker clock
shUI is offline Report comment to moderator  
Reply With Quote
Unread 11-02-10, 06:48 AM  
shinx
A Defias Bandit

Forum posts: 2
File comments: 71
Uploads: 0
Originally posted by shUI
The next update is going to have a small config section that will take care of all these problems! Sorry about that guys.
Thx it works great!

For me i delete "%p" , "am" and "pm" behind the Time, not necessary for 24 hour format.

@ X-buZZ

FIND this code in the shclock.lua

time = lower(date("%H:%M:%S"))
else
time = lower(date("%I:%M:%S"))


and delete :%S
Last edited by shinx : 11-02-10 at 07:06 AM.
shinx is offline Report comment to moderator  
Reply With Quote
Unread 11-02-10, 05:19 AM  
X-buZZ
A Kobold Labourer

Forum posts: 1
File comments: 56
Uploads: 0
Hi shUI,

a very nice small piece of work.
Besides of the am/pm thing for 24 mode (i am on a german client) i would love to have an option to NOT display the seconds. Would that be possible?

Regards
X-buZZ
X-buZZ is offline Report comment to moderator  
Reply With Quote
Unread 11-01-10, 01:24 PM  
shUI
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 321
Uploads: 5
Originally posted by shinx
hi, any way to add 24 hours support or can you please explain me how i can do it by myself?

bye
The next update is going to have a small config section that will take care of all these problems! Sorry about that guys.
__________________
shPerformance: Data Broker memory/latency/fps usage display utility
shNameplates: Lightweight, simple, and sexy nameplates
shClock: Lightweight and simple data broker clock
shUI is offline Report comment to moderator  
Reply With Quote
Unread 11-01-10, 11:21 AM  
shinx
A Defias Bandit

Forum posts: 2
File comments: 71
Uploads: 0
hi, any way to add 24 hours support or can you please explain me how i can do it by myself?

bye
shinx is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: