javaÖеÄSystem.currentTimeMillis()º¯Êý
System.currentTimeMillis()£º¿ÉÒÔÌáÈ¡µ½µ±Ç°Ê±¼äµÄºÁÃëÊý£¬²úÉúÒ»¸öµ±Ç°µÄºÁÃ룬Õâ¸öºÁÃëÆäʵ¾ÍÊÇ×Ô1970Äê1ÔÂ1ÈÕ0ʱÆðµÄºÁÃëÊý¡£
³£¼û×÷ÓãºÒ»°ã¶¼ÊÇÓÃ2¸öʱ¼äµÄ²îÖµÀ´µÃµ½ÔËÐÐʱ¼äµÄ£¬³£ÓÃÀ´±È½Ï2¸öËã·¨µÄЧÂÊ£¡
long start = System.currentTimeMillis();
// ÕâÀï¿ÉÒÔ¼ÓÉÏÄãÒªÖªµÀµÄ·½·¨ÔËÐеÄʱ¼ä£¡£¡
long end = System.currentTimeMillis();
System.out.println("ÔËÐÐʱ¼ä£º"+(end - start));
¸ñʽ»¯System.currentTimeMillis()
1 import java.text.SimpleDateFormat;
2 import java.util.Locale;
3
4
5 public class FormatCurrentTime {
6 /**
7 * @param args
8 */
9 public static void main(String[] args) {
10
11 SimpleDateFormat sdf = new SimpleDateFormat("", Locale.SIMPLIFIED_CHINESE);
12 sdf.applyPattern("yyyyÄêMMÔÂddÈÕ HHʱmm·ÖssÃë");
13 System.out.println(sdf.format(System.currentTimeMillis()));
14
15 }
16 }
17
Ïà¹ØÎĵµ£º
¸ú×ÅÀÏʦѧjavaÕâô¾ÃÁË£¬¶ÔÕâÖÖÕâ¸öÓïÑÔСϺÊÇÕâÑùÀí½âµÄ£¬ËüÊǸöÖÖÉϳ˵ÄÎ书Ãؼ® £¨µ±È»°üÀ¨ÆäËûÓïÑÔ£©£¬Ñ§Ï°Ê±ºÜÈÝÒ××ß»ðÈëħ£¡ÓкܶàjavaµÄ¸ßÊÖ£¬ºÜÀ÷º¦£¡ºÎÒÔ¼ûµÃ£¬ÄãҪʲôʲô¶¼ÄܸøÄãд³öÀ´¶øÇÒÓÃʱ·Ç³£µÄÉÙ£¬Ð¡Ïº²»²Å£¬Ò»Ö±ÒÔÀ´ÐÅ·îÕâÑù²Å½Ð³ÌÐòÔ±£¡ÆäʵСϺÀí½â´í¿©£¬´íÔÚ°ÜÁË£¡Íæ¼¼Êõ£¬Ö»Òª¿¼Ò»¿¼±ãÖªµÀÄãµÄ訮 ......
JDBC£º
|-- Êý¾Ý¿â»¥Áª¡£
|-- ÓÉSUN¹«Ë¾ËùÖƶ¨µÄÓÃÀ´·ÃÎÊÊý¾Ý¿âµÄ¹æ·¶¡£
|-- Êý¾Ý¿âÊý¾Ý <= ½»»¥ => Ó¦ÓóÌÐò¡£
JDBC°üº¬Ö÷ÒªÁ½¸ö²¿·Ö£º
|-- part 1.ÓÉSUN¹«Ë¾Öƶ¨µÄ¹æ·¶½Ó¿Ú
|-- ......
JDBC Name: jTDS
URL: http://jtds.sourceforge.net/
Version: 0.5.1
Download URL: http://sourceforge.net/project/showfiles.php?group_id=33291
Óï·¨:
Class.forName("net.sourceforge.jtds.jdbc.Driver
");
Connection con =
DriverManager.getConnection("jdbc:jtds:sqlserver://host:port/datab ......
import java.io.*;
/**
* linux ÏÂcpu ÄÚ´æ ´ÅÅÌ jvmµÄʹÓüà¿Ø
* @author avery_leo
*
*/
public class TT {
/**
* »ñÈ¡cpuʹÓÃÇé¿ö
* @return
&nbs ......