Java版原子计时器

这是一个以纯Java2D绘制的原子钟界面,原版为:http://www.jug-muenster.de/swing-nixieclock-321/ 创作。

我将其原始代码稍加调整,写了一个LGame版的,凑个热闹。

运行界面如下(核心都是Java2D,无非就是由Swing移植到AWT而已……):

00

代码如下:

package org.test; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics2D; import java.awt.LinearGradientPaint; import java.awt.RenderingHints; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.geom.Area; import java.awt.geom.Ellipse2D; import java.awt.geom.GeneralPath; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.geom.RoundRectangle2D; import java.awt.image.BufferedImage; import java.util.Calendar; import org.loon.framework.game.simple.GameScene; import org.loon.framework.game.simple.action.sprite.Sprite; import org.loon.framework.game.simple.core.LSystem; import org.loon.framework.game.simple.core.graphics.Deploy; import org.loon.framework.game.simple.core.graphics.Screen; import org.loon.framework.game.simple.core.timer.LTimer; import org.loon.framework.game.simple.core.timer.LTimerContext; import org.loon.framework.game.simple.utils.GraphicsUtils; /** * Copyright 2008 - 2009 * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. * * @project loonframework * @author chenpeng * @email:ceponline@yahoo.com.cn * @version 0.1 */ public class Main extends Screen { final NixieNumber[] nixies = new NixieNumber[6]; final LTimer timer = new LTimer(LSystem.SECOND / 10); public Main() { this.setBackground(new Color(68, 68, 68)); int size = 20; for (int i = 0; i < nixies.length; i++) { this.nixies[i] = new NixieNumber(); this.nixies[i].setLocation(size, 20); size += nixies[i].getWidth(); if (i % 2 != 0) { size += nixieNumberWidth; } this.add(nixies[i]); } } public void alter(LTimerContext context) { if (timer.action(context.getTimeSinceLastUpdate())) { if (Calendar.getInstance().get(Calendar.HOUR_OF_DAY) < 10) { nixies[0].setNumber(0); nixies[1].setNumber(Calendar.getInstance().get( Calendar.HOUR_OF_DAY)); } else { nixies[0].setNumber(Integer.parseInt(Integer.toString( Calendar.getInstance().get(Calendar.HOUR_OF_DAY)) .substring(0, 1))); nixies[1].setNumber(Integer.parseInt(Integer.toString( Calendar.getInstance().get(Calendar.HOUR_OF_DAY)) .substring(1, 2))); } // Minutes if (Calendar.getInstance().get(Calendar.MINUTE) < 10) { nixies[2].setNumber(0); nixies[3].setNumber(Calendar.getInstance().get(Calendar.MINUTE)); } else { nixies[2].setNumber(Integer.parseInt(Integer.toString( Calendar.getInstance().get(Calendar.MINUTE)).substring( 0, 1))); nixies[3].setNumber(Integer.parseInt(Integer.toString( Calendar.getInstance().get(Calendar.MINUTE)).substring( 1, 2))); } // Seconds if (Calendar.getInstance().get(Calendar.SECOND) < 10) { nixies[4].setNumber(0); nixies[5].setNumber(Calendar.getInstance().get(Calendar.SECOND)); } else { nixies[4].setNumber(Integer.parseInt(Integer.toString( Calendar.getInstance().get(Calendar.SECOND)).substring( 0, 1))); nixies[5].setNumber(Integer.parseInt(Integer.toString( Calendar.getInstance().get(Calendar.SECOND)).substring( 1, 2))); } } } private static int nixieNumberWidth = 86, nixieNumberHeight = 146; /** * * @author hansolo * */ public class NixieNumber extends Sprite { /** * */ private static final long serialVersionUID = 1L; private int number; private BufferedImage[] numberStack = new BufferedImage[10]; private final Point2D GLOW_START = new Point2D.Float( 0, 47); private final Point2D GLOW_STOP = new Point2D.Float( 0, 133); private final float[] GLOW_FRACTIONS = { 0.0f, 0.5f, 1.0f }; private final Color[] GLOW_COLORS = { new Color(0.647f, 0.3137f, 0.0588f, 0.2f), new Color(0.9882f, 0.5921f, 0.0f, 0.3f), new Color(0.647f, 0.3137f, 0.0588f, 0.2f) }; private final LinearGradientPaint GLOW_GRADIENT = new LinearGradientPaint( GLOW_START, GLOW_STOP, GLOW_FRACTIONS, GLOW_COLORS); private final Rectangle2D GLOW_BOX = new Rectangle2D.Float( 13, 47, 60, 86); private final Color[] COLOR_ARRAY = { new Color(1.0f, 0.6f, 0, 0.90f), new Color(1.0f, 0.4f, 0, 0.80f), new Color(1.0f, 0.4f, 0, 0.4f), new Color(1.0f, 0.4f, 0, 0.15f), new Color(1.0f, 0.4f, 0, 0.10f), new Color(1.0f, 0.4f, 0, 0.05f) }; private final BufferedImage[] INACTIVE_NUMBER_ARRAY = { createNumber(0, false), createNumber(1, false), createNumber(2, false), createNumber(3, false), createNumber(4, false), createNumber(5, false), createNumber(6, false), createNumber(7, false), createNumber(8, false), createNumber(9, false), }; private final BufferedImage[] ACTIVE_NUMBER_ARRAY = { createNumber(0, true), createNumber(1, true), createNumber(2, true), createNumber(3, true), createNumber(4, true), createNumber(5, true), createNumber(6, true), createNumber(7, true), createNumber(8, true), createNumber(9, true), }; private BufferedImage background; public NixieNumber() { } public int getWidth() { return nixieNumberWidth; } public int getHeight() { return nixieNumberHeight; } public void createUI(Graphics2D g) { if (!isVisible()) { return; } Graphics2D g2 = (Graphics2D) g.create(); g2.translate(x(), y()); // Backside glow effect if (number > -1) { g2.setPaint(GLOW_GRADIENT); g2.fill(GLOW_BOX); } // Draw nixie number for (int i = 0; i < 10; i++) { g2.drawImage(this.numberStack[i], 12, 42, null); } if (background == null) { background = GraphicsUtils.createImage(getWidth(), getHeight(), true); Graphics2D g2d = background.createGraphics(); // Draw hatch g2d.drawImage(createMiddleImage(), 0, 0, null); // Draw tube g2d.drawImage(createBackgroundImage(), 0, 0, null); // Draw light effects of tube g2d.drawImage(createForegroundImage(), 0, 0, null); g2d.dispose(); } g2.drawImage(background, 0, 0, null); g2.dispose(); } private BufferedImage createBackgroundImage() { BufferedImage IMAGE = GraphicsUtils.createImage(getWidth(), getHeight(), true); Graphics2D g2 = IMAGE.createGraphics(); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint( RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); g2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE); // Create glass tube form final Area TUBE = new Area( new RoundRectangle2D.Float(1, 8, 86, 136, 86, 86)); final Area TUBE_BOTTOM = new Area( new RoundRectangle2D.Float(1, 75, 86, 70, 30, 30)); final Area TUBE_TOP = new Area( new Ellipse2D.Float(38, 0, 12, 18)); TUBE.add(TUBE_TOP); TUBE.add(TUBE_BOTTOM); final Point2D START = new Point2D.Float( 0, 0); final Point2D STOP = new Point2D.Float( 86, 0); final float[] FRACTIONS = { 0.0f, 0.15f, 0.4f, 0.6f, 0.85f, 1.0f }; final Color[] COLORS = { new Color(0.0f, 0.0f, 0.0f, 0.5f), new Color(0.0f, 0.0f, 0.0f, 0.3f), new Color(0.0f, 0.0f, 0.0f, 0.1f), new Color(0.0f, 0.0f, 0.0f, 0.1f), new Color(0.0f, 0.0f, 0.0f, 0.3f), new Color(0.0f, 0.0f, 0.0f, 0.5f) }; final LinearGradientPaint GRADIENT = new LinearGradientPaint(START, STOP, FRACTIONS, COLORS); g2.setPaint(GRADIENT); g2.fill(TUBE); g2.dispose(); return IMAGE; } private BufferedImage createMiddleImage() { BufferedImage IMAGE = GraphicsUtils.createImage(86, 146, true); Graphics2D g2 = IMAGE.createGraphics(); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); g2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE); // Create front hatch g2.setColor(new Color(0.0f, 0.0f, 0.0f, 0.2f)); for (int x = 14; x <= 75; x += 5) { g2.draw(new Line2D.Float(x, 47, x, 133)); } for (int y = 47; y <= 134; y += 5) { g2.draw(new Line2D.Float(14, y, 74, y)); } // Create number contacts LinearGradientPaint contactGradient; Point2D contactStart; Point2D contactStop; final float[] CONTACT_FRACTIONS = { 0.0f, 0.5f, 1.0f }; final Color[] CONTACT_COLORS = { new Color(0.0f, 0.0f, 0.0f, 0.3f), new Color(1.0f, 1.0f, 1.0f, 0.3f), new Color(0.0f, 0.0f, 0.0f, 0.3f) }; for (int x = 18; x < 67; x += 6) { contactStart = new Point2D.Float(x, 0); contactStop = new Point2D.Float(x + 3, 0); contactGradient = new LinearGradientPaint(contactStart, contactStop, CONTACT_FRACTIONS, CONTACT_COLORS); g2.setPaint(contactGradient); g2.fill(new Rectangle2D.Float(x, 132, 4, 10)); } g2.dispose(); return IMAGE; } private BufferedImage createForegroundImage() { BufferedImage IMAGE = GraphicsUtils.createImage(86, 146, true); Graphics2D g2 = IMAGE.createGraphics(); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); g2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE); // Create left side reflection effect final Area SIDE_LIGHT_EFFECT = new Area(new RoundRectangle2D.Float( 3, 43, 36, 99, 18, 18)); final Area EFFECT_SUB = new Area(new RoundRectangle2D.Float(7, 37, 36, 105, 18, 18)); SIDE_LIGHT_EFFECT.subtract(EFFECT_SUB); final Point2D SIDE_LIGHT_EFFECT_START = new Point2D.Float(3, 0); final Point2D SIDE_LIGHT_EFFECT_STOP = new Point2D.Float(13, 0); final float[] SIDE_LIGHT_EFFECT_FRACTIONS = { 0.0f, 1.0f }; final Color[] SIDE_LIGHT_EFFECT_COLORS = { new Color(1.0f, 1.0f, 1.0f, 0.5f), new Color(1.0f, 1.0f, 1.0f, 0.0f) }; final LinearGradientPaint SIDE_LIGHT_EFFECT_GRADIENT = new LinearGradientPaint( SIDE_LIGHT_EFFECT_START, SIDE_LIGHT_EFFECT_STOP, SIDE_LIGHT_EFFECT_FRACTIONS, SIDE_LIGHT_EFFECT_COLORS); g2.setPaint(SIDE_LIGHT_EFFECT_GRADIENT); g2.fill(SIDE_LIGHT_EFFECT); // Create stripe reflection effect final Rectangle2D STRIPE_LIGHT_EFFECT = new Rectangle2D.Float(13, 46, 62, 1); final Point2D STRIPE_LIGHT_EFFECT_START = new Point2D.Float(13, 0); final Point2D STRIPE_LIGHT_EFFECT_STOP = new Point2D.Float(75, 0); final float[] STRIPE_LIGHT_EFFECT_FRACTIONS = { 0.0f, 0.5f, 1.0f }; final Color[] STRIPE_LIGHT_EFFECT_COLORS = { new Color(1.0f, 1.0f, 1.0f, 0.0f), new Color(1.0f, 1.0f, 1.0f, 0.5f), new Color(1.0f, 1.0f, 1.0f, 0.0f) }; final LinearGradientPaint STRIPE_LIGHT_EFFECT_GRADIENT = new LinearGradientPaint( STRIPE_LIGHT_EFFECT_START, STRIPE_LIGHT_EFFECT_STOP, STRIPE_LIGHT_EFFECT_FRACTIONS, STRIPE_LIGHT_EFFECT_COLORS); g2.setPaint(STRIPE_LIGHT_EFFECT_GRADIENT); g2.fill(STRIPE_LIGHT_EFFECT); // Create top reflection effect final Ellipse2D TOP_LIGHT_EFFECT = new Ellipse2D.Float(17, 11, 52, 21); final Point2D TOP_LIGHT_EFFECT_START = new Point2D.Float(0, 11); final Point2D TOP_LIGHT_EFFECT_STOP = new Point2D.Float(0, 32); final float[] TOP_LIGHT_EFFECT_FRACTIONS = { 0.0f, 1.0f }; final Color[] TOP_LIGHT_EFFECT_COLORS = { new Color(1.0f, 1.0f, 1.0f, 0.5f), new Color(1.0f, 1.0f, 1.0f, 0.0f) }; final LinearGradientPaint TOP_LIGHT_EFFECT_GRADIENT = new LinearGradientPaint( TOP_LIGHT_EFFECT_START, TOP_LIGHT_EFFECT_STOP, TOP_LIGHT_EFFECT_FRACTIONS, TOP_LIGHT_EFFECT_COLORS); g2.setPaint(TOP_LIGHT_EFFECT_GRADIENT); g2.fill(TOP_LIGHT_EFFECT); // Create small top reflection effect final Ellipse2D SMALL_TOP_LIGHT_EFFECT = new Ellipse2D.Float(39, 3, 4, 6); final Point2D SMALL_TOP_LIGHT_EFFECT_START = new Point2D.Float(0, 3); final Point2D SMALL_TOP_LIGHT_EFFECT_STOP = new Point2D.Float(0, 9); final float[] SMALL_TOP_LIGHT_EFFECT_FRACTIONS = { 0.0f, 1.0f }; final Color[] SMALL_TOP_LIGHT_EFFECT_COLORS = { new Color(1.0f, 1.0f, 1.0f, 0.3f), new Color(1.0f, 1.0f, 1.0f, 0.0f) }; final LinearGradientPaint SMALL_TOP_LIGHT_EFFECT_GRADIENT = new LinearGradientPaint( SMALL_TOP_LIGHT_EFFECT_START, SMALL_TOP_LIGHT_EFFECT_STOP, SMALL_TOP_LIGHT_EFFECT_FRACTIONS, SMALL_TOP_LIGHT_EFFECT_COLORS); g2.setPaint(SMALL_TOP_LIGHT_EFFECT_GRADIENT); g2.fill(SMALL_TOP_LIGHT_EFFECT); g2.dispose(); return IMAGE; } private BufferedImage createNumber(int number, boolean active) { BufferedImage IMAGE = GraphicsUtils.createImage(62, 97, true); Graphics2D g2 = IMAGE.createGraphics(); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); g2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY); g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE); GeneralPath numberPath = new GeneralPath(); switch (number) { case 0: numberPath = new GeneralPath(new Ellipse2D.Float(4, 6, 46, 77)); break; case 1: numberPath = new GeneralPath(new Ellipse2D.Float(25, 1, 3, 85)); break; case 2: numberPath = new GeneralPath(); numberPath.moveTo(2, 23); numberPath.lineTo(3, 22); numberPath.lineTo(6, 16); numberPath.lineTo(9, 13); numberPath.lineTo(13, 10); numberPath.lineTo(18, 7); numberPath.lineTo(25, 6); numberPath.lineTo(31, 6); numberPath.lineTo(37, 8); numberPath.lineTo(44, 12); numberPath.lineTo(47, 18); numberPath.lineTo(49, 25); numberPath.lineTo(48, 31); numberPath.lineTo(46, 37); numberPath.lineTo(42, 39); numberPath.lineTo(36, 42); numberPath.lineTo(29, 44); numberPath.lineTo(22, 47); numberPath.lineTo(14, 54); numberPath.lineTo(9, 60); numberPath.lineTo(5, 68); numberPath.lineTo(4, 76); numberPath.lineTo(3, 82); numberPath.lineTo(51, 82); break; case 3: numberPath = new GeneralPath(); numberPath.moveTo(3, 6); numberPath.lineTo(48, 6); numberPath.lineTo(48, 8); numberPath.lineTo(28, 34); numberPath.lineTo(31, 36); numberPath.lineTo(35, 37); numberPath.lineTo(41, 40); numberPath.lineTo(45, 46); numberPath.lineTo(49, 53); numberPath.lineTo(49, 60); numberPath.lineTo(48, 67); numberPath.lineTo(46, 71); numberPath.lineTo(43, 75); numberPath.lineTo(38, 80); numberPath.lineTo(27, 83); numberPath.lineTo(22, 83); numberPath.lineTo(17, 82); numberPath.lineTo(12, 80); numberPath.lineTo(8, 77); numberPath.lineTo(3, 71); break; case 4: numberPath = new GeneralPath(); numberPath.moveTo(50, 59); numberPath.lineTo(4, 59); numberPath.lineTo(2, 58); numberPath.lineTo(1, 56); numberPath.lineTo(35, 4); numberPath.lineTo(35, 83); break; case 5: numberPath = new GeneralPath(); numberPath.moveTo(44, 6); numberPath.lineTo(10, 6); numberPath.lineTo(6, 41); numberPath.lineTo(8, 41); numberPath.lineTo(14, 37); numberPath.lineTo(21, 36); numberPath.lineTo(30, 36); numberPath.lineTo(38, 39); numberPath.lineTo(49, 53); numberPath.lineTo(49, 61); numberPath.lineTo(47, 69); numberPath.lineTo(44, 75); numberPath.lineTo(38, 80); numberPath.lineTo(30, 82); numberPath.lineTo(24, 83); numberPath.lineTo(18, 82); numberPath.lineTo(12, 79); numberPath.lineTo(6, 74); numberPath.lineTo(3, 69); break; case 6: numberPath = new GeneralPath(); numberPath.moveTo(28, 1); numberPath.lineTo(4, 48); numberPath.append(new Ellipse2D.Float(2, 34, 48, 48), false); break; case 7: numberPath = new GeneralPath(); numberPath.moveTo(2, 3); numberPath.lineTo(51, 3); numberPath.lineTo(25, 85); break; case 8: numberPath = new GeneralPath(new Ellipse2D.Float(1, 39, 50, 45)); numberPath.append(new Ellipse2D.Float(6, 2, 42, 37), false); break; case 9: numberPath = new GeneralPath(); numberPath.moveTo(30, 85); numberPath.lineTo(51, 32); numberPath.append(new Ellipse2D.Float(3, 3, 48, 48), false); break; } // Translate 5,5 because of the linewidth of 12px for the glowing // effect g2.translate(5, 5); if (active) { // Draw active number with glow effect for (float width = 12; width > 0; width -= 2f) { g2.setStroke(new BasicStroke(width, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)); g2.setColor(COLOR_ARRAY[(int) (width / 2 - 1)]); g2.draw(numberPath); } } else { // Draw inactive number g2.setColor(new Color(0.2f, 0.2f, 0.2f, 0.6f)); g2.draw(numberPath); } g2.dispose(); return IMAGE; } private void createNumberStack() { // Order of numbers in stack // 1 0 2 3 9 4 8 5 7 6 if (this.number > -1) { // 1 if (this.number == 1) { numberStack[0] = ACTIVE_NUMBER_ARRAY[1]; } else { numberStack[0] = INACTIVE_NUMBER_ARRAY[1]; } // 0 if (this.number == 0) { numberStack[1] = ACTIVE_NUMBER_ARRAY[0]; } else { numberStack[1] = INACTIVE_NUMBER_ARRAY[0]; } // 2 if (this.number == 2) { numberStack[2] = ACTIVE_NUMBER_ARRAY[2]; } else { numberStack[2] = INACTIVE_NUMBER_ARRAY[2]; } // 3 if (this.number == 3) { numberStack[3] = ACTIVE_NUMBER_ARRAY[3]; } else { numberStack[3] = INACTIVE_NUMBER_ARRAY[3]; } // 9 if (this.number == 9) { numberStack[4] = ACTIVE_NUMBER_ARRAY[9]; } else { numberStack[4] = INACTIVE_NUMBER_ARRAY[9]; } // 4 if (this.number == 4) { numberStack[5] = ACTIVE_NUMBER_ARRAY[4]; } else { numberStack[5] = INACTIVE_NUMBER_ARRAY[4]; } // 8 if (this.number == 8) { numberStack[6] = ACTIVE_NUMBER_ARRAY[8]; } else { numberStack[6] = INACTIVE_NUMBER_ARRAY[8]; } // 5 if (this.number == 5) { numberStack[7] = ACTIVE_NUMBER_ARRAY[5]; } else { numberStack[7] = INACTIVE_NUMBER_ARRAY[5]; } // 7 if (this.number == 7) { numberStack[8] = ACTIVE_NUMBER_ARRAY[7]; } else { numberStack[8] = INACTIVE_NUMBER_ARRAY[7]; } // 6 if (this.number == 6) { numberStack[9] = ACTIVE_NUMBER_ARRAY[6]; } else { numberStack[9] = INACTIVE_NUMBER_ARRAY[6]; } } else { for (int i = 0; i < 10; i++) { numberStack[i] = INACTIVE_NUMBER_ARRAY[i]; } } } public void setNumber(int number) { if (number < 0) { number = -1; } if (number > 9) { number = 9; } this.number = number; createNumberStack(); } } public void draw(Graphics2D g) { } public void leftClick(MouseEvent e) { } public void middleClick(MouseEvent e) { } public void onKey(KeyEvent e) { } public void onKeyUp(KeyEvent e) { } public void rightClick(MouseEvent e) { } public static void main(String[] args) { GameScene frame = new GameScene("电子计时器", 749, 186); Deploy deploy = frame.getDeploy(); deploy.setScreen(new Main()); deploy.setShowFPS(false); deploy.setLogo(false); deploy.setFPS(40); deploy.mainLoop(); frame.showFrame(); } }

执行文件及源码下载地址:http://loon-simple.googlecode.com/files/Clock.7z

另外此例若用OpenGL开发,显示单位可以精确到微秒(否则刷新速度跟不上),准备更新0.3版LGame-Simple时加个微秒单位当示例用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值