Search Results

Search found 1503 results on 61 pages for 'timestamp'.

Page 8/61 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Is System.nanoTime() consistent across threads?

    - by obvio171
    I want to count the time elapsed between two events in nanoseconds. To do that, I can use System.nanoTime() as mentioned here. The problem is that the two events are happening in different threads. Since nanoTime() doesn't return an absolute timestamp but instead can only be used to calculate time differences, I'd like to know if the values I get on the two different threads are consistent with the physical time elapsed between the two events.

    Read the article

  • How make decides to build target

    - by Michael
    One sign is that target does not exist, understand this. Another is by comparing modification timestamp of target and prerequisites. How it works in more details? What is the logic of comparing target and prerequisite timestamps and how it works when there are multiple prerequisites?

    Read the article

  • SQL - First row inserted every day for the past X days

    - by okie.floyd
    A tough SQL question (I'm using postgres by the way). I need the first row inserted every day for the past X days. one of my columns is a timestamp, which i hold the time inserted, and another column is the row id. If it's not possible to get the first row inserted every day, i at least need a unique one; a single row for every day for the past x days. Any suggestions? Thanks okie

    Read the article

  • Programmatically Determine If An Excel File (.xls) Contains Macros

    - by Gkakk McJkakk
    Is there any way to programmatically determine if an .xls contains macros, without actually opening it in Excel? Also are there any methods to examine which certificate (including timestamp cert) these macros are signed with? Again without using Excel. I'm wondering in particular if there are any strings that always show up in the raw data of an Excel file when macros are present.

    Read the article

  • How to add timestamp to the logfilename with the apache log4j

    - by swati
    Hello Everyone, I am new to using apache logger . I have downloaded the log4j-xx and i have the following text configuration file # Set root logger level to DEBUG and its only appender to mainFormat. log4j.rootLogger = TRACE, mainFormat, FILE # mainFormat is set to be a ConsoleAppender. log4j.appender.mainFormat=org.apache.log4j.ConsoleAppender # mainFormat uses PatternLayout. log4j.appender.mainFormat.layout=org.apache.log4j.PatternLayout log4j.appender.mainFormat.layout.ConversionPattern=%d [%t] %-5p %c - %m%n #File makes a file of the output. log4j.appender.FILE=org.apache.log4j.FileAppender log4j.appender.FILE.File=log4j_HAPR001_OutputFile.log log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n i use the above config file to create the log file. Now i wanted to add the current time stamp to the log file. Is there any way to do this. If yes can some one please give me the instructions how to do. Thanks in advance. Regards, Swati

    Read the article

  • How to add timestamp to the logfilename with the apache log4j

    - by swati
    I am new to using apache logger . I have downloaded the log4j-xx and i have the following text configuration file # Set root logger level to DEBUG and its only appender to mainFormat. log4j.rootLogger = TRACE, mainFormat, FILE # mainFormat is set to be a ConsoleAppender. log4j.appender.mainFormat=org.apache.log4j.ConsoleAppender # mainFormat uses PatternLayout. log4j.appender.mainFormat.layout=org.apache.log4j.PatternLayout log4j.appender.mainFormat.layout.ConversionPattern=%d [%t] %-5p %c - %m%n #File makes a file of the output. log4j.appender.FILE=org.apache.log4j.FileAppender log4j.appender.FILE.File=log4j_HAPR001_OutputFile.log log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n i use the above config file to create the log file. Now i wanted to add the current time stamp to the log file. Is there any way to do this. If yes can some one please give me the instructions how to do. Thanks in advance. Regards, Swati

    Read the article

  • mplayer timestamp not disappearing

    - by contagious
    I'm using Linux Mint 8 64bit with Google Chrome Unstable (same problem with beta). When a video is playing, the time elapsed and total time stay on the screen: Is there a way to make this disappear? I've tried all kinds of preferences, but to no avail.

    Read the article

  • Create timestamp formula for Excel

    - by flpgdt
    The idea is simple, I'd like a function I could do something like =MOD_DATE_OF(A1:A4) and when any of the cells in such range is modified, the cell I assigned that formula gets the current date. I have found some similar questions on the web and even here, but none of them quite it. The closest I've got was this code somewhere (sorry, lost track of the source): Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Column = 1 Then Target.Offset(0, 1).Value = Date End If End Sub But it is still not a function.. I am using Excel from Office 2010 thanks

    Read the article

  • Do you know of a C macro to compute Unix time and date?

    - by Alexis Wilke
    I'm wondering if someone knows/has a C macro to compute a static Unix time from a hard coded date and time as in: time_t t = UNIX_TIMESTAMP(2012, 5, 10, 9, 26, 13); I'm looking into that because I want to have a numeric static timestamp. This will be done hundred of times throughout the software, each time with a different date, and I want to make sure it is fast because it will run hundreds of times every second. Converting dates that many times would definitively slow down things (i.e. calling mktime() is slower than having a static number compiled in place, right?) [made an update to try to render this paragraph clearer, Nov 23, 2012] Update I want to clarify the question with more information about the process being used. As my server receives requests, for each request, it starts a new process. That process is constantly updated with new plugins and quite often such updates require a database update. Those must be run only once. To know whether an update is necessary, I want to use a Unix date (which is better than using a counter because a counter is much more likely to break once in a while.) The plugins will thus receive an update signal and have their on_update() function called. There I want to do something like this: void some_plugin::on_update(time_t last_update) { if(last_update < UNIX_TIMESTAMP(2010, 3, 22, 20, 9, 26)) { ...run update... } if(last_update < UNIX_TIMESTAMP(2012, 5, 10, 9, 26, 13)) { ...run update... } // as many test as required... } As you can see, if I have to compute the unix timestamp each time, this could represent thousands of calls per process and if you receive 100 hits a second x 1000 calls, you wasted 100,000 calls when you could have had the compiler compute those numbers once at compile time. Putting the value in a static variable is of no interest because this code will run once per process run. Note that the last_update variable changes depending on the website being hit (it comes from the database.) Code Okay, I got the code now: // helper (Days in February) #define _SNAP_UNIX_TIMESTAMP_FDAY(year) \ (((year) % 400) == 0 ? 29LL : \ (((year) % 100) == 0 ? 28LL : \ (((year) % 4) == 0 ? 29LL : \ 28LL))) // helper (Days in the year) #define _SNAP_UNIX_TIMESTAMP_YDAY(year, month, day) \ ( \ /* January */ static_cast<qint64>(day) \ /* February */ + ((month) >= 2 ? 31LL : 0LL) \ /* March */ + ((month) >= 3 ? _SNAP_UNIX_TIMESTAMP_FDAY(year) : 0LL) \ /* April */ + ((month) >= 4 ? 31LL : 0LL) \ /* May */ + ((month) >= 5 ? 30LL : 0LL) \ /* June */ + ((month) >= 6 ? 31LL : 0LL) \ /* July */ + ((month) >= 7 ? 30LL : 0LL) \ /* August */ + ((month) >= 8 ? 31LL : 0LL) \ /* September */+ ((month) >= 9 ? 31LL : 0LL) \ /* October */ + ((month) >= 10 ? 30LL : 0LL) \ /* November */ + ((month) >= 11 ? 31LL : 0LL) \ /* December */ + ((month) >= 12 ? 30LL : 0LL) \ ) #define SNAP_UNIX_TIMESTAMP(year, month, day, hour, minute, second) \ ( /* time */ static_cast<qint64>(second) \ + static_cast<qint64>(minute) * 60LL \ + static_cast<qint64>(hour) * 3600LL \ + /* year day (month + day) */ (_SNAP_UNIX_TIMESTAMP_YDAY(year, month, day) - 1) * 86400LL \ + /* year */ (static_cast<qint64>(year) - 1970LL) * 31536000LL \ + ((static_cast<qint64>(year) - 1969LL) / 4LL) * 86400LL \ - ((static_cast<qint64>(year) - 1901LL) / 100LL) * 86400LL \ + ((static_cast<qint64>(year) - 1601LL) / 400LL) * 86400LL ) WARNING: Do not use these macros to dynamically compute a date. It is SLOWER than mktime(). This being said, if you have a hard coded date, then the compiler will compute the time_t value at compile time. Slower to compile, but faster to execute over and over again.

    Read the article

  • NHibernate and mysql timestamp

    - by HeavyWave
    I am trying to do versioning with NHibernate and everything works fine, however right after the insert NHibernate tries to pull the generated timestamp by executing the following query: SELECT profileloc_.Updated as Updated14_ FROM profile_locale profileloc_ WHERE profileloc_.id=?p0 and profileloc_.culture=?p1;?p0 = 16, ?p1 = 1033 Which is totally wrong, as it will pull out all versions starting with the first one. How do I make it add ORDER BY Updated DESC to this query? I am using Fluent NHibernate for mappings.

    Read the article

  • Rails: find by day of week with timestamp

    - by Sleepycat
    I need to grab the records for same day of the week for the preceeding X days of the week. There must be a better way to do it than this: Transaction.find_by_sql "select * from transactions where EXTRACT(DOW from date) = 1 and organisation_id = 4 order by date desc limit 7" It gets me what I need but is Postgres specific and not very "Rails-y". Date is a timestamp. Anyone got suggestions?

    Read the article

  • sqlite3 timestamp column

    - by Flavius
    Hi I feel stupid, but I can't get a TIMESTAMP column to be shown in human understandable way in a SELECT. I could do that in MySQL, not in sqlite3. Could someone show me an example please? Thanks

    Read the article

  • 7zip timestamp archive under context menu

    - by Daniel
    Does anyone know how I can add a context menu item that would compress a folder and add a timestamp? So that I can right-click a folder and it would give me the option to create something like this: folder_20100528.zip (I'm posting it here because I figure it's something that's done through a batch file/code)

    Read the article

  • Mysql timestamp query

    - by Hulk
    In mysql a result of a query is say select timestamp from newbie; | 2010-03-12 14:50:46 | | 2010-03-12 14:50:46 | | 2010-03-12 14:50:51 | | 2010-03-12 14:50:52 | | 2010-03-12 14:50:54 | | 2010-03-12 14:51:04 | | 2010-03-12 14:51:07 | | 2010-03-12 14:51:08 | Is there a way to subquery the above and sum up the i.e, the final result should be the delta of each row in hh:mm:ss format

    Read the article

  • EXTRACT for TIMESTAMP types in SQLite3

    - by umuthorax
    Hi, It seems extract function is not supported by SQLite3 for timestamp types (ref). For example; select extract(year from l_shipdate) as l_year from ... gives the following error; Error: near "from": syntax error I wonder whether there is an alternative way to do this in SQLite3 (or through rewriting the SQL query). Thanks in advance,

    Read the article

  • Performance with timestamp conditions

    - by Tim Whitlock
    Which of the following is faster, or are they equivalent? (grabbing recent most records from a TIMESTAMP COLUMN) SELECT UNIX_TIMESTAMP(`modified`) stamp FROM `some_table` HAVING stamp > 127068799 ORDER BY stamp DESC or SELECT UNIX_TIMESTAMP(`modified`) stamp FROM `some_table` WHERE UNIX_TIMESTAMP(`modified`) > 127068799 ORDER BY `modified` DESC or even another combination?

    Read the article

  • Formatting a long timestamp into a Date with JSTL

    - by scubabbl
    I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP. I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't work. Any advice? Thanks.

    Read the article

  • MySql - set of time stamped data (timestamp,event) calculating events per day

    - by Kevin Ohashi
    I have a table: id, datetime, event i also have table dates: date (Y-m-d format) the problem is some days don't have any events, I would like them to show 0 (or null) SELECT DATE_FORMAT(table.timestamp, '%Y-%m-%d') ydm, count(table.fkUID) FROM `table` where table.fkUID=$var group by ydm; is there some way to join or use conditional statements to make the result show: date|count ---------- 2010-05-23| 5 2010-05-24| 0 <--- this line just doesn't exist in my query. 2010-05-26| 3

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >