{"id":1831,"date":"2014-09-02T11:33:00","date_gmt":"2014-09-02T16:33:00","guid":{"rendered":"http:\/\/linuxitos.com\/main\/cronometro-en-java\/"},"modified":"2014-09-02T11:33:00","modified_gmt":"2014-09-02T16:33:00","slug":"cronometro-en-java","status":"publish","type":"post","link":"https:\/\/linuxitos.com\/main\/cronometro-en-java\/","title":{"rendered":"Cron\u00f3metro en java"},"content":{"rendered":"<div style=\"text-align: justify;\"><span style=\"font-family: Verdana, sans-serif;\">Recientemente en un proyecto me fue necesario crear un cron\u00f3metro, o la simulaci\u00f3n de uno, para poder hacer esto y mostrar en pantalla, fue necesario usar hilos, no hay de otra.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-family: Verdana, sans-serif;\">EL mini-cron\u00f3metro que le mostrar\u00e9 a continuaci\u00f3n es sencillo, cuando le dan clic en el bot\u00f3n iniciar cron\u00f3metro, l\u00f3gicamente, el cron\u00f3metro inicia, y se bloquea el bot\u00f3n, esto para evitar que se genere un nuevo hilo.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-family: Verdana, sans-serif;\">El bot\u00f3n reiniciar cron\u00f3metro hace exactamente eso.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-family: Verdana, sans-serif;\">La interfaz es sencilla, es la siguiente:<\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><a href=\"http:\/\/3.bp.blogspot.com\/-ZpjsDuHcGOI\/VAXvtPJ2d7I\/AAAAAAAAAPo\/MCMkr7d2dR4\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2014-09-02%2B11%3A25%3A33.png\" style=\"margin-left: 1em; margin-right: 1em;\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/-ZpjsDuHcGOI\/VAXvtPJ2d7I\/AAAAAAAAAPo\/MCMkr7d2dR4\/s1600\/Captura%2Bde%2Bpantalla%2Bde%2B2014-09-02%2B11%3A25%3A33.png\" height=\"247\" width=\"400\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: center;\"><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-family: Verdana, sans-serif;\">La imagen de arriba, muestra la interfaz que cuenta el cron\u00f3metro, como pueden ver, es una aplicaci\u00f3n muy simple, la clase Tiempo contiene los m\u00e9todos que son necesarios para poder usar el cron\u00f3metro, en caso de que deseen modificar a su conveniencia no hay problema de ello.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"font-family: Verdana, sans-serif;\">El proyecto lo pueden descargar de <a href=\"https:\/\/mega.co.nz\/#!eZhX2SqC!IFIIhZf-jZPTAHIuXzXwELVAXW_jv9dV1uE3T-xCWEw\" target=\"_blank\">aqu\u00ed<\/a>, si los links est\u00e1n rotos, por favor avisarme para poder corregirlos.<\/span><\/div>\n<div>\n<pre style=\"background: rgb(255, 255, 213); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-color: rgba(0, 0, 0, 0.14902) rgba(0, 0, 0, 0.14902) rgba(0, 0, 0, 0.14902) rgb(64, 64, 64); border-style: solid; border-top-left-radius: 4px; border-top-right-radius: 4px; border-width: 1px 1px 1px 5px; color: #333333; font-family: 'Courier New', Courier, monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-top: 10px; padding: 1em; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;\"># Comentar es algo bueno, criticar es mucho mejor.<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Recientemente en un proyecto me fue necesario crear un cron\u00f3metro, o la simulaci\u00f3n de uno, para poder hacer esto y mostrar en pantalla, fue necesario usar hilos, no hay de otra. EL mini-cron\u00f3metro que le mostrar\u00e9 a continuaci\u00f3n es sencillo, cuando le dan clic en el bot\u00f3n iniciar cron\u00f3metro, l\u00f3gicamente, el cron\u00f3metro inicia, y se [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1471,87,1470,446,4,1469,1472,1473],"tags":[],"class_list":["post-1831","post","type-post","status-publish","format-standard","hentry","category-cronometro","category-gnome","category-hilos","category-java","category-linux","category-reloj","category-thread","category-tiempo"],"_links":{"self":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/comments?post=1831"}],"version-history":[{"count":0,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/posts\/1831\/revisions"}],"wp:attachment":[{"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/media?parent=1831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/categories?post=1831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxitos.com\/main\/wp-json\/wp\/v2\/tags?post=1831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}