Finding out idle time

How can i find out the idle time in java?
I want to fire an even if the idle time is 1 minute
Thanks

Topic: IDLE Time for Java Application not SYSTEM Idle Hi I am Krishna , I want to calculate idle time for an application.That is , if user1 uses the application for example called "yahoo site" for checking mails , then after 10 mins he went to outside , from 11th min the status of application should show (Like Yahoo messenger after certail time it shows idle time ) in another ADMINJSP page for Admins that how much this user1 idle say.. : 1 min idle 2 min idle .... .... 10 min idle Now user1 comes and now clicks on application . then ADMINJSP page should show total IDLE time (10 mins idle). And he again after 15 mins he went some where from 16th min the status of the application should show in ADMINJSP page.If user1 left the application like that then the application should be idle for 1 hour i.e 1 min idle 2 min idle ... ... 59 mins idle 60 mins idle Time Up -- Session Expired then he has to login again. So the above is the issue --------------------------------------------------------------------------- What i have done ..................issssssssssssss ------------------------------------------------------------------------- I have taken time for last request by using getLastAccessedTime() I have taken present time System.currentTimeMills() Taking the difference we will get the idle time . But the problem here is When user1 click on any page only this calcuting will be done and showing to ADMINJSP because getLastAccessedTime works only when any requests comes , but we dont want like that , we want the application without any requests from user1 the application should show idle for 1 min , 2 mins , 3 mins...so on upto user1 uses the application then the time should be normal. I have also tried all the EVENTS classes in HttpSessionBinding like valueunbound()...or sessiondestroy() etc. Can any one please help me by giving any CODE.If you need more information plz ask me Plz plz plz plz this is very urgent plz can any please send me the CODE , ihave tried this very hard but no idea how to do? long startTime = session.getLastAccessedTime(); long stopTime = System.currentTimeMillis(); long diffTimeInSecs = (stopTime - startTime) / 1000 ; gives idle time for every request Regards Krishna

Similar Messages

  • How to find out insertion time of records in an oracle table

    Hi everybody,
    I have a table with about 50,000 records in my Oracle database and there is a date column which shows the date that each record get inserted to the table, for example 04-Aug-13.
    Is there any way that I can find out what time each record has been inserted?
    For example: 04-Aug-13 4:20:00 PM. (For my existing records not future ones)
    I searched over the internet and find some results but none of them seem to be practical.
    Thanks for your help.

    I have a table with about 50,000 records in my Oracle database and there is a date column which shows the date that each record get inserted to the table, for example 04-Aug-13.
    Is there any way that I can find out what time each record has been inserted?
    For example: 04-Aug-13 4:20:00 PM. (For my existing records not future ones)
    First you need to clarify what you mean by 'the date that each record get inserted'.  A row is not permanent and visible to other sessions until it has been COMMITTED and that commit may happen seconds, minutes, hours or even days AFTER a user actually creates the row and puts a date in your 'date column'.
    Second - your date column, and ALL date columns, includes a time component. So just query your date column for the time.
    The only way that time value will be incorrect is if you did something silly like TRUNC(myDate) when you inserted the value. That would use a time component of 00:00:00 and destroy the actual time.

  • How can you find out what time you were on a website on on your iPod?

    How can you find out what time and day you were on a certain website on your iPod?

    You can find the day in Safari's History, but not the time.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • Wmi script to find out the time when the user was added to local administration group

    Hi Friends,
    i need a script/query based on wmi/wql that find out the time when the user was added to local administration group on this computer
    Regards
    Tanoj
    OSLM ENGINEER - SCCM 2007 & 2012

    WMI does not keep security information.
    Unless you have enabled auditing, this information is not retained in any way.
    If auditing is enabled, you can write a powershell script to look for the specific event in the eventlog. More specifically, you should look for all security events with id 4732 containing the group.
    this one command does the trick
    get-eventlog -logname security -instanceid 4732 -message *administrators*
    https://technet.microsoft.com/en-us/library/dd772663(v=ws.10).aspx
    MCP/MCSA/MCTS/MCITP

  • How to find out the time when the ASE started?

    Normally, ASE not reboot for production. Only for maintenance or performance tuning, maybe need to reboot ASE.
    Question is how to find out the time when ASE was started?
    one way maybe is check errorlog. Any more simple way no need to login to server OS?

    Hi Kent,
    In ASE 12.5 and up, you can do 'select @@boottime'  For older releases, a general method is 'select crdate from sysdatabases where dbid=2'
    1> select @@boottime, crdate from sysdatabases where dbid=2
    2> go
                                     crdate
                 Jul 15 2014  9:19AM             Jul 15 2014  9:19AM
    (1 row affected)
    Cheers
    Dan

  • HT4910 My iCloud account was turned off can I find out what time this happened

    My daughters I pad was hacked. The I cloud was turned off so the tracking system would not work. Is there a way to find out what time of day this happened.
    I can at least let her teacher know what class this happened in. We were just lucky we caught it before it was stolen. Does anyone have any good ways to track iPad for parents. My daughter has Down's syndrome and really needs her iPad to help her with her class work.

    Look at the serial number on the back of the nano and input this into https://selfsolve.apple.com/agreementWarrantyDynamic.do. This should tell you what type of iPod you have.

  • Find out my time capsule's mac-address ?

    Hi,
    I need to find out my time-capsule's mac-address to allow it on my network (ethernet mac-address).
    I found some answers to that question but unfortunatly with the old version of airport utility.
    Thanks, Léo

    1. The MAC address is printed on the label of the rubber mat on the bottom of the TC.. right there on the TC itself.. you might need a magnifying glass to see it if like me you are getting old.
    2. Download and use the REAL airport utility.
    http://support.apple.com/kb/DL1482
    Since apple knew the one they supplied in Lion was useless.. they released on the same day the original version updated for lion.. so you could do something.. ie a utility that has utility.. rather than utility to look pretty.

  • Query to find out the time used by an user for an application

    Hello All,
    I want to know the query to find out the whole time used by the user for an application. Please view the below data
    Employee:
    SNO EMP_ID EMP_NAME EMP_DATE LOGIN_TIME LOGOUT_TIME
    1 10 Visu 21-Nov-2010 06:30:00 07:30:00
    2 10 Visu 21-Nov-2010 06:40:00 07:20:00
    3 10 Visu 21-Nov-2010 06:50:00 07:50:00
    4 10 Visu 21-Nov-2010 07:30:00 08:30:00
    5 10 Visu 21-Nov-2010 09:30:00 10:30:00
    By checking the above data we can say that the total time Visu used the application is
    8.30 - 6.30 (From 1,2,3,4 records) = 2hrs
    10.30 - 9.30 (Based on 5th rec) = 1hr
    So the total time Visu used the application would be 3 hrs = 180 mins.
    Could you please help me in getting the result from that data using a query?

    odie_63 wrote:
    I think it may be solved with analytics too.
    with t1 as (
                select 1 sno,10 emp_id,'Visu' emp_name,'21-Nov-2010' emp_date,'06:30:00' login_time,'07:30:00' logout_time from dual union all
                select 2,10,'Visu','21-Nov-2010','06:40:00','07:20:00' from dual union all
                select 3,10,'Visu','21-Nov-2010','06:50:00','07:50:00' from dual union all
                select 4,10,'Visu','21-Nov-2010','07:30:00','08:30:00' from dual union all
                select 5,10,'Visu','21-Nov-2010','09:30:00','10:30:00' from dual
         t2 as (
                select  emp_id,
                        emp_name,
                        emp_date,
                        to_date(emp_date || login_time,'DD-MON-YYYYHH24:MI:SS') login_time,
                        to_date(emp_date || logout_time,'DD-MON-YYYYHH24:MI:SS') logout_time
                  from  t1
         t3 as (
                select  t2.*,
                        case
                          when login_time < max(logout_time) over(
                                                                  partition by emp_id,emp_date
                                                                  order by login_time
                                                                  rows between unbounded preceding
                                                                           and 1 preceding
                            then 0
                          else 1
                        end start_of_group
                  from  t2
         t4 as (
                select  t3.*,
                        sum(start_of_group) over(partition by emp_id,emp_date order by login_time) grp
                  from  t3
         t5 as (
                select  emp_id,
                        emp_date,
                        min(login_time) login_time,
                        max(logout_time) logout_time
                  from  t4
                  group by emp_id,
                           emp_date,
                           grp
    select  emp_id,
            numtodsinterval(sum(logout_time - login_time),'day') time_spent
      from  t5
      group by emp_id
      order by emp_id
        EMP_ID TIME_SPENT
            10 +000000000 03:00:00.000000000
    SQL> SY.

  • How to find out the Time necessary to produce something?

    Hello all, please help me in this issue.
    *{color:#0000ff}I need to find out the amount of time a machine will spend doing some quantity of a product.{color}*
    {color:#008080}*I have a Machine-A which is able to produce _1000 _unities per hour (1 hour = 1000 unities).*{color}
    {color:#333399}*Then I need to produce _3650 _unities.*{color}
    {color:#800000}*Now I have to know what time the Machine-A will need to produce that amount of 3650 unities (in hours and minutes).*{color}
    double unitiesPerHour = 1000;
    double unitiesToProduce = 3650;Any help appreciated.
    Thanks

    {color:#000000}I{color} {color:#020202}w{color}{color:#040404}i{color}{color:#050505}s{color}{color:#070707}h{color} {color:#090909}I{color} {color:#0c0c0c}c{color}{color:#0e0e0e}o{color}{color:#0f0f0f}u{color}{color:#101010}l{color}{color:#121212}d{color} {color:#151515}c{color}{color:#161616}r{color}{color:#171717}e{color}{color:#191919}a{color}{color:#1a1a1a}t{color}{color:#1c1c1c}e{color} {color:#1e1e1e}a{color} {color:#212121}c{color}{color:#232323}o{color}{color:#242424}l{color}{color:#252525}o{color}{color:#272727}u{color}{color:#282828}r{color}{color:#2a2a2a}f{color}{color:#2b2b2b}u{color}{color:#2c2c2c}l{color} {color:#2f2f2f}p{color}{color:#313131}o{color}{color:#323232}s{color}{color:#333333}t{color}{color:#353535},{color} {color:#383838}l{color}{color:#393939}i{color}{color:#3a3a3a}k{color}{color:#3c3c3c}e{color} {color:#3f3f3f}a{color}{color:#404040}l{color}{color:#414141}l{color} {color:#444444}t{color}{color:#464646}h{color}{color:#474747}e{color} {color:#4a4a4a}c{color}{color:#4b4b4b}o{color}{color:#4d4d4d}o{color}{color:#4e4e4e}l{color} {color:#515151}k{color}{color:#525252}i{color}{color:#545454}d{color}{color:#555555}s{color} {color:#585858}d{color}{color:#595959}o{color} {color:#5c5c5c}t{color}{color:#5d5d5d}h{color}{color:#5f5f5f}e{color}{color:#606060}s{color}{color:#626262}e{color} {color:#646464}d{color}{color:#666666}a{color}{color:#676767}y{color}{color:#696969}s{color}{color:#6a6a6a}.{color} {color:#6d6d6d}b{color}{color:#6e6e6e}u{color}{color:#707070}t{color} {color:#727272}a{color}{color:#747474}s{color} {color:#777777}i{color}{color:#787878}t{color} {color:#7b7b7b}i{color}{color:#7c7c7c}s{color} {color:#7f7f7f}I{color} {color:#828282}j{color}{color:#838383}u{color}{color:#858585}s{color}{color:#868686}t{color} {color:#898989}h{color}{color:#8a8a8a}a{color}{color:#8c8c8c}v{color}{color:#8d8d8d}e{color} {color:#909090}o{color}{color:#919191}n{color}{color:#939393}e{color} {color:#959595}t{color}{color:#979797}y{color}{color:#989898}p{color}{color:#9a9a9a}e{color}{color:#9b9b9b}w{color}{color:#9c9c9c}r{color}{color:#9e9e9e}i{color}{color:#9f9f9f}t{color}{color:#a1a1a1}e{color}{color:#a2a2a2}r{color} {color:#a5a5a5}r{color}{color:#a6a6a6}i{color}{color:#a8a8a8}b{color}{color:#a9a9a9}b{color}{color:#aaaaaa}o{color}{color:#acacac}n{color} {color:#afafaf}l{color}{color:#b0b0b0}e{color}{color:#b1b1b1}f{color}{color:#b3b3b3}t{color} {color:#b6b6b6}a{color}{color:#b7b7b7}n{color}{color:#b8b8b8}d{color} {color:#bbbbbb}i{color}{color:#bdbdbd}t{color} {color:#bfbfbf}i{color}{color:#c1c1c1}s{color} {color:#c4c4c4}q{color}{color:#c5c5c5}u{color}{color:#c6c6c6}i{color}{color:#c8c8c8}t{color}{color:#c9c9c9}e{color} {color:#cccccc}w{color}{color:#cdcdcd}o{color}{color:#cfcfcf}r{color}{color:#d0d0d0}n{color} {color:#d3d3d3}o{color}{color:#d4d4d4}u{color}{color:#d6d6d6}t{color}{color:#d7d7d7}.{color}{color:#d9d9d9}.{color}{color:#dadada}.{color}{color:#dbdbdb}.{color}{color:#dddddd}.{color}{color:#dedede}.{color}{color:#e0e0e0}.{color}{color:#e1e1e1}.{color}{color:#e2e2e2}.{color}{color:#e4e4e4}.{color}{color:#e5e5e5}.{color}{color:#e7e7e7}.{color}{color:#e8e8e8}.{color}{color:#e9e9e9}.{color}{color:#ebebeb}.{color}{color:#ececec}.{color}{color:#eeeeee}.{color}{color:#efefef}.{color}{color:#f0f0f0}.{color}{color:#f2f2f2}.{color}{color:#f3f3f3}.{color}{color:#f5f5f5}.{color}{color:#f6f6f6}.{color}{color:#f7f7f7}.{color}{color:#f9f9f9}.{color}{color:#fafafa}.{color}{color:#fcfcfc}.{color}

  • Finding out what time an application was used

    I know that you can find out when an application was "Last Used/Opened", but is there a way to see all the recent times its been open? So say if I wanted to see if an application was opened in a certain period of time (like a certain hour), is that possible?

    In addition to the standard creation and modification times, Mac OS X does record the last accessed time for a file. I don't know of any way to show this information in the Finder, but in the terminal you can run the ls command with the -u flag to show the last accessed time instead of the modified time. Running "ls -ul /Applications" will show you when the applications were last launched. You can pipe the results through grep to just show when Mail was last launched "ls -ul /Applications | grep Mail".
    Michael
    Mac Pro   Mac OS X (10.4.8)  

  • How to find out last time, when AE was started?

    Hi guys!
    I need to find out, when was our AE last time started.. Is it possible w/o Visual Admin?
    Thank you!
    Olian

    Hi Olian,
    You need to go into RWB.
    Inside RWB go to Component Monitoring -> Adapter Engine  ->  Adapter monitoring. You will see all the adapter listings there.
    Thanks
    Aashish Sinha
    PS : Reward points if Helped

  • Find CPU idle time

    Can anybody help me out in finding the cpu time or cpu usage percentage for a particular process in windows xp environment.
    Any suggestion should be of a great help.
    Thanks
    Muthu

    Can this found using java??Nope.
    This is an OS specific question (Windows XP in your case).
    Java cannot be useful in this area.
    As already mentioned maybe the best way is to search at msdn.microsoft.com and google groups with appropriate keywords.
    My experience with your specific issue is to use the WMI (Windows Management Instrumentation) Performance Counter Win32 Classes components which are a set of COM objects (available on NT/2K/XP/2K3/Vista) that allows to do all sort of administrative tasks with the OS.
    One of these classes ([url http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_perfrawdata_perfproc_process.asp?frame=true]Win32_PerfRawData_PerfProc_Process class) is a performance counters that monitor running application program and system processes.
    You should have a look at this post to know how to use this class:
    http://groups.google.com/group/microsoft.public.win32.programmer.wmi/msg/ac8691a2f885f29e
    By the way the microsoft.public.win32.programmer.wmi group is a good start to read/ask questions about WMI related issues.
    To integrate your WMI solution with Java you have at least two solutions:
    1- ( This is the simple solution. ) Create your vbs script (see the post above) then use Runtime.exec() to execute it and retrieve the appropriate information.
    2- Use [url http://sourceforge.net/projects/jacob-project/]JACOB or any other Java COM bridge to instanciate and use
    the COM object to retrieve the appropriate information.
    Regards

  • Find out run time

    Hi;
    I try to find the run time for Fibonnaci on number 50, but the result cause me confuse, because the 5 times results are very differnt, could anyone tell me why? Thanks
    The following is the report of the 5 times of the run times on the 50
    Execute recursiveBigFib: 12586269025
    In the (1) time, It takes 11 to run the number of 50
    Execute recursiveBigFib: 12586269025
    In the (2) time, It takes 1 to run the number of 50
    Execute recursiveBigFib: 12586269025
    In the (3) time, It takes 0 to run the number of 50
    Execute recursiveBigFib: 12586269025
    In the (4) time, It takes 0 to run the number of 50
    Execute recursiveBigFib: 12586269025
    In the (5) time, It takes 1 to run the number of 50
    import java.math.BigInteger;
    import java.util.*;
    import java.math.*;
    class Fibber{
         class BIPair{
            BigInteger fibn;
            BigInteger fibnminus;
        BIPair recursiveBigFib(int n){
            BIPair ret = new BIPair();
            BIPair nminusret = null;
            if(n <=2){
                ret.fibn =  BigInteger.ONE;
                ret.fibnminus = BigInteger.ONE;
            }else{
                nminusret = recursiveBigFib(n-1);
                ret.fibn = nminusret.fibn.add( nminusret.fibnminus);
                ret.fibnminus = nminusret.fibn;
            return ret;
        void execute(int n)
            BIPair bip = recursiveBigFib(n);
            System.out.println("\t Execute recursiveBigFib: " + bip.fibn);
    class SlowFib {        
            public static void main(String[] args) {
                Fibber fibber=new Fibber();
                  int n = 50;
                  long startTime;
                  long endTime;
                  long totalTime;
                  System.out.println("\t The following is the report of the 5 times of the run times on the 50");
                  System.out.println("\t ----------------------------------------------------------------------");
                   for(int i=0; i<5; i++){
                      startTime=System.currentTimeMillis();
                      fibber.execute(n);
                      endTime=System.currentTimeMillis();
                      totalTime=endTime-startTime;
                      System.out.println("\t In the (" + (i+1) + ") time," +" It takes " + totalTime +" to run the number of " + n);
                      System.out.println();

    You're missing the point. Telling it to pause between runs isn't going to help. You need whatever happens between the starting call to currentTimeMillis and the ending call to currentTimeMillis to take at least 1-10 seconds.
    Imagine you're watching a the seconds tick over on a digital clock:
    3:15:01
    3:15:02
    3:15:03
    etc.
    Your friend says, "time how long it takes me to do this shot of tequila". He says "GO", drinks the shot, says "STOP". Let's say it takes him about a second to drink the shot.
    You might se zero seconds tick over (if he starts at 3:15:01.001 and ends at 3:15:01.999)
    Or you might see one second tick over (3:15:01.000 - 3:15:02.000)
    Or you might see two seconds tick over (3:15:01.999 - 3:15:03.001)
    The actual times were 0.998 sec., 1.000 sec., and 1.002 sec, but you'd record it as 0 sec., 1 sec., and 2 sec. You're only accurate to +/- 1 sec., so if what he's doing takes about 1 sec., you have a margin of error of 100%. You can't make your measurements anymore precise than 1 sec., so to reduce the relative margin of error, you need to increase the total time measured.
    So your buddy says "GO" drinks 10 shots of tequila, and then stays "STOP". It maybe takes him 10.7 seconds, and you maybe measuer 9.9 or 11.2 or something. You get more accurate numbers than before, plus you get to watch your buddy make an ass of himself hitting on the cute bartender.
    GO and STOP are currentTimeMillis, and your buddy drinking shots is fibber.execute(). Timing your buddy for one shot, having him wait a while, then timing him for one more shot isn't going to make your 1-shot measurements any more accurate--they're still limited by the fact that each one takes about a second, and you can only measure to the nearest second.

  • How do I find out the time of my browsing history in iPad Safari

    Dear all,
    I require a detail of my own iPad browsing history, here is my problem:
    My MBP got stolen recently and have a personal cloud service installed on it.  Just checked my cloud server and found a odd IP-address record, just need to confirm if I have accessed my cloud account at that time on my iPad or possible was originated from the stolen MBP.
    Cloud server indicated showed activity from one recognised IP from my own house @20.38 and an unknow IP @23.38
    Hence I want to check the exact time that I visit the cloud service via my Safari browser (iPad), but as far as I could get is all the browsing history are grouped by date and I cannot find the time information, can anyone helps?
    Thanks

    There is no built in way to see the time in the Safari Browsing history. There may be a third party computer application that would allow you to extract the information from the iPad, but the function is not built into the iOS.

  • Find out the time sheet data entry fields

    hi
    this is satish,
              i inserted the time sheet values in the time sheet data entry view. now the my problem is where these field values store in which tables.
    thanks for all

    Hi:
    I need to transfer CATS data to FICO. I found out about transaction CAT7.
    At the moment, I have 2 issues:
    1) My CATSDB data have status "30". However, there is no corresponding entries in CATSCO. Could you tell me what I need to do to ensure that CATSCO has values?
    2) My FICO system is running on 4.6C whereas my HR system is running on ECC6.0. Can CAT7 still works?
    I appreciate your response.
    Thanks,
    Ash

Maybe you are looking for