×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Does Timer Affect Performance

Does Timer Affect Performance

Does Timer Affect Performance

(OP)
Hi All,
THis a preformance question.

If I apply a timer interval to a window to a do job every certain period, lets say 3 minutes. During these 3 minutes does the performance of the application affected.

Regards
 

RE: Does Timer Affect Performance

Hi!

It depends on what you are doing. If it is going to be disk/processor intensive, other applications will be affected. More details on what you want to achieve will help me give you a better feedback.

And with timers always remember to set it to 0 while processing and then reset it i.e.

CODE

LastTime     TIME

OPEN(Window)

Window{PROP:Timer} = 6000  ! every minute

ACCEPT

  CASE EVENT()
  OF EVENT:Timer
    IF (CLOCK() - LastTime) > 18000 OR CLOCK() < LastTime ! midnight rollover
       Window{PROP:Time} = 0
       ... Do Processing ...
       Window{PROP:Time} = 6000
       LastTime = CLOCK()
    END
  END

END

CLOSE(Window)

Regards
 

RE: Does Timer Affect Performance

(OP)
Hello
Iam  creating an application that captures the texts or images in clipboard, thanks to you shanker I used freeimage classes as you advised in my thread "Capture Images from memory with Clipboard Function" .

so my plan is to use the timer to check the clipboard each 5 seconds. if there are changes in clipboard it will be saved to a logfile.

so I have only one problem now that if the clipboard contents wasnt change , it will duplicate the values in my log file.
for text contents it is no problem that I can compare the clipboard contents with the previous one , but not if the content is an image.
also wondering if this routine with the timer each 5 seconds will affect the performance?

regards


 

RE: Does Timer Affect Performance

Hi!

There are Clipboard Managers already available - why are you re-inventing the wheel?

You can set the timer to 100 i.e. 1 sec and process every 5 seconds. If your processing time is short it should not make any impact on performance.

You can always process duplicates by comparing against the previous data captured by having different storage area for different formats i.e. text or binary.

Regards
 

RE: Does Timer Affect Performance

(OP)
Hello
About creating such tools I have two goals, one is that I can embed it in my applications and the other is gaining more knowledge with such discussions.

About our subject , you mean that I should compare the physically created file ?

is there a way to save the clipboard contents when it is an image to a memory variable?

Thank you

Best Regards
 

RE: Does Timer Affect Performance

Hi!

You need to store WHATEVER you are getting from the CLIPBOARD contents into memory variable so that you can compare the next time. Since the size would vary use reference strings (&STRING) or create a dummy Topspeed table with BLOB columns. You can assign to the BLOBs without saving the row/record.

Regards
 

RE: Does Timer Affect Performance

(OP)
Hello Shanker,
I created a Topspeed table with BLOB columns and succeded to capture clipboard images and store them in the BLOB field but failed to compare the values.

Can you please explain more .

regards
 

RE: Does Timer Affect Performance

(OP)
sorry , adding to above , I assigned the clipboard images to two blob fields and let the program assign the clipboard image to one field at a time. but I could'nt know how to compare the contents of the fields


THank you  

RE: Does Timer Affect Performance

Hi,

Blobs are zero-based strings. So, you compare them with string splicing i.e.

CODE

MyBLOB           BLOB
MyClipBoard      STRING(1024)

IF MyBlob{PROP:Size} > 1 AND LEN(CLIP(MyClipBoard)) > 1
   IF MyBLOB[0 : (MyBlob{PROP:Size}-1)] = MyClipBoard[1 : LEN(CLIP(MyClipBoard))]
      !contents are similar
   ELSE
      !contents are NOT similar
   END
END

Regards
 

RE: Does Timer Affect Performance

(OP)
Everything is fine now .. thank for your help

Best Regards
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close